From 7f9d184b8ace75eee5d5435da048c18543dced2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Gonz=C3=A1lez=20Santamarta?= Date: Fri, 10 Jan 2025 09:57:32 +0100 Subject: [PATCH] minor fixes to goal in execute --- llama_ros/src/llama_ros/llama_node.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/llama_ros/src/llama_ros/llama_node.cpp b/llama_ros/src/llama_ros/llama_node.cpp index a0a5137..4fb7aff 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());