diff --git a/llama_ros/src/llama_ros/llama_node.cpp b/llama_ros/src/llama_ros/llama_node.cpp index a0a51373..4fb7aff0 100644 --- a/llama_ros/src/llama_ros/llama_node.cpp +++ b/llama_ros/src/llama_ros/llama_node.cpp @@ -484,10 +484,11 @@ void LlamaNode::execute( // get goal data this->goal_handle_ = goal_handle; auto goal = goal_handle->get_goal(); + auto result = std::make_shared(); + std::string prompt = goal->prompt; std::vector stop = goal->stop; - bool reset = goal_handle->get_goal()->reset; - auto result = std::make_shared(); + bool reset = goal->reset; // check if goal is empty if (this->goal_empty(goal)) { @@ -503,7 +504,7 @@ void LlamaNode::execute( } // update sampling params of common_params - auto sampling_config = goal_handle->get_goal()->sampling_config; + auto sampling_config = goal->sampling_config; auto sparams = llama_utils::parse_sampling_params(sampling_config, this->llama->get_n_vocab());