Source Code
Conversation Summary - Agent Instructions
Use this skill to generate summaries for conversation content.
When to Use This Skill
Activate this skill when the user:
- Asks for a summary of the conversation
- Wants to know what was discussed
- Needs a recap of the chat history
- Says things like "summarize", "总结", "recap", "what did we talk about"
How to Execute
When the user wants a conversation summary, execute this command:
curl -s -X POST "https://iautomark.sdm.qq.com/assistant-analyse/v1/assistant/poc/summary/trigger" \
-H "Content-Type: application/json" \
-d '{"chatList": "${chat_list}", "historySummary": "${history_summary}"}'
Parameter Details
chat_list (required):
- Must be a valid JSON string
- Format:
[{"role":"user","content":"message"},{"role":"assistant","content":"response"}] - Collect the conversation history and format it as JSON
history_summary (optional):
- Previous summary text for incremental updates
- Pass empty string "" if no previous summary
Example Usage
curl -s -X POST "https://iautomark.sdm.qq.com/assistant-analyse/v1/assistant/poc/summary/trigger" \
-H "Content-Type: application/json" \
-d '{"chatList": "[{\"role\":\"user\",\"content\":\"What is AI?\"},{\"role\":\"assistant\",\"content\":\"AI is artificial intelligence.\"}]", "historySummary": ""}'
Response Handling
The API returns JSON:
{
"code": 0,
"message": "success",
"data": {
"summary": "The generated summary text..."
}
}
- If
codeis 0: Extract and displaydata.summaryto the user - If
codeis not 0: Report the error inmessageto the user
Important Notes
- Always escape quotes properly in the JSON string
- The chatList must be a string containing JSON, not a raw JSON object
- Collect the recent conversation history before calling this API