fix: ReAct tool use format in few-shot (#2542)

This commit is contained in:
yetone
2025-07-28 11:14:45 +08:00
committed by GitHub
parent 0a2143586a
commit 7e50de8904
3 changed files with 9 additions and 0 deletions

View File

@@ -34,6 +34,9 @@ TOOLS USAGE GUIDE
**Crucial Example of Correct Behavior:**
* **User Input:** "Hi there"
* **Your REQUIRED Output (as a tool call):**
{% if use_react_prompt -%}
<tool_use>{"name": "attempt_completion", "input": {"result": "[**Generated Response Following the Greeting Response Guideline**]"}}</tool_use>
{% else -%}
```json
{
"tool_calls": [
@@ -47,3 +50,4 @@ TOOLS USAGE GUIDE
]
}
```
{% endif %}