Skip to content

Commit

Permalink
minor fixes to goal in execute
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Jan 10, 2025
1 parent 43173bb commit 7f9d184
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions llama_ros/src/llama_ros/llama_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<GenerateResponse::Result>();

std::string prompt = goal->prompt;
std::vector<std::string> stop = goal->stop;
bool reset = goal_handle->get_goal()->reset;
auto result = std::make_shared<GenerateResponse::Result>();
bool reset = goal->reset;

// check if goal is empty
if (this->goal_empty(goal)) {
Expand All @@ -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());

Expand Down

0 comments on commit 7f9d184

Please sign in to comment.