mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? #9082 #6365 <u> **WARNING: it's not compatible with the older version of `Agent` module, which means that `Agent` from older versions can not work anymore.**</u> ### Type of change - [x] New Feature (non-breaking change which adds functionality)
35 lines
1.2 KiB
Markdown
35 lines
1.2 KiB
Markdown
**Role**: AI Assistant
|
|
**Task**: Summarize tool call responses
|
|
**Rules**:
|
|
1. Context: You've executed a tool (API/function) and received a response.
|
|
2. Condense the response into 1-2 short sentences.
|
|
3. Never omit:
|
|
- Success/error status
|
|
- Core results (e.g., data points, decisions)
|
|
- Critical constraints (e.g., limits, conditions)
|
|
4. Exclude technical details like timestamps/request IDs unless crucial.
|
|
5. Use language as the same as main content of the tool response.
|
|
|
|
**Response Template**:
|
|
"[Status] + [Key Outcome] + [Critical Constraints]"
|
|
|
|
**Examples**:
|
|
🔹 Tool Response:
|
|
{"status": "success", "temperature": 78.2, "unit": "F", "location": "Tokyo", "timestamp": 16923456}
|
|
→ Summary: "Success: Tokyo temperature is 78°F."
|
|
|
|
🔹 Tool Response:
|
|
{"error": "invalid_api_key", "message": "Authentication failed: expired key"}
|
|
→ Summary: "Error: Authentication failed (expired API key)."
|
|
|
|
🔹 Tool Response:
|
|
{"available": true, "inventory": 12, "product": "widget", "limit": "max 5 per customer"}
|
|
→ Summary: "Available: 12 widgets in stock (max 5 per customer)."
|
|
|
|
**Your Turn**:
|
|
- Tool call: {{ name }}
|
|
- Tool inputs as following:
|
|
{{ params }}
|
|
|
|
- Tool Response:
|
|
{{ result }} |