fix: use consistent <tool_call> tag in channel system prompt (#305)
The tool use protocol in channels/mod.rs was using <invoke> tags, but the parser in agent/loop_.rs only recognizes <tool_call> tags. This ensures consistency across all entry points.
This commit is contained in:
parent
4fd1408034
commit
b3fcdad3b5
1 changed files with 2 additions and 2 deletions
|
|
@ -333,8 +333,8 @@ pub fn build_system_prompt(
|
||||||
let _ = writeln!(prompt, "- **{name}**: {desc}");
|
let _ = writeln!(prompt, "- **{name}**: {desc}");
|
||||||
}
|
}
|
||||||
prompt.push_str("\n## Tool Use Protocol\n\n");
|
prompt.push_str("\n## Tool Use Protocol\n\n");
|
||||||
prompt.push_str("To use a tool, wrap a JSON object in <invoke> tags:\n\n");
|
prompt.push_str("To use a tool, wrap a JSON object in <tool_call></tool_call> tags:\n\n");
|
||||||
prompt.push_str("```\n<invoke>\n{\"name\": \"tool_name\", \"arguments\": {\"param\": \"value\"}}\n</invoke>\n```\n\n");
|
prompt.push_str("```\n<tool_call>\n{\"name\": \"tool_name\", \"arguments\": {\"param\": \"value\"}}\n</tool_call>\n```\n\n");
|
||||||
prompt.push_str("You may use multiple tool calls in a single response. ");
|
prompt.push_str("You may use multiple tool calls in a single response. ");
|
||||||
prompt.push_str("After tool execution, results appear in <tool_result> tags. ");
|
prompt.push_str("After tool execution, results appear in <tool_result> tags. ");
|
||||||
prompt
|
prompt
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue