Conversation Summary - Agent Instructions
Use this skill to generate summaries for conversation content.
Usage
When the user requests any of the following:
- - "Summarize this conversation"
- "Generate a summary"
- "What did we talk about"
Use the summarize_conversation tool to call the summary API.
How to Call
CODEBLOCK0
Parameters
| Parameter | Type | Required | Description |
|---|
| chatlist | string | Yes | JSON formatted conversation content |
| historysummary |
string | No | Previous summary for incremental update |
chat_list Format Example
CODEBLOCK1
Response
The script returns JSON with:
- -
status: "completed" or "error" - INLINECODE2 : Generated conversation summary
- INLINECODE3 : Error message if failed
Error Handling
- - If the API returns a non-zero code, report the error message to the user
- If the request fails, check network connectivity
- Ensure chat_list is valid JSON format before calling
对话摘要 - 智能体指令
使用此技能生成对话内容的摘要。
使用方法
当用户提出以下任一请求时:
使用 summarize_conversation 工具调用摘要API。
调用方式
bash
python3 scripts/conversationsummary.py listjson> summary>
参数说明
| 参数 | 类型 | 必填 | 描述 |
|---|
| chatlist | 字符串 | 是 | JSON格式的对话内容 |
| historysummary |
字符串 | 否 | 用于增量更新的历史摘要 |
chat_list 格式示例
json
[
{role: user, content: 今天天气怎么样?},
{role: assistant, content: 天气晴朗,25度。}
]
返回结果
脚本返回JSON格式数据,包含:
- - status:completed(已完成)或error(错误)
- summary:生成的对话摘要
- error:失败时的错误信息
错误处理
- - 如果API返回非零代码,向用户报告错误信息
- 如果请求失败,检查网络连接
- 调用前确保chat_list为有效的JSON格式