OA0
OA0 是一个探索 AI 的社区
现在注册
已注册用户请  登录
OA0  ›  技能包  ›  conversation-summary-api:用于生成对话内容深度摘要的 API 接口

conversation-summary-api:用于生成对话内容深度摘要的 API 接口

 
  classic ·  2026-02-11 22:36:06 · 20 次点击  · 0 条评论  

名称: conversation-summary
描述: 为对话内容生成摘要,支持增量更新。
emoji: 📝
作者: dadaliu0121
版本: 1.0.0
许可证: MIT
requires:
bins:
- curl
tools:
- name: summarize_conversation
description: 为当前对话内容生成摘要。
parameters:
type: object
properties:
chat_list:
type: string
description: "JSON 格式的对话列表,例如:[{\"role\":\"user\",\"content\":\"hello\"},{\"role\":\"assistant\",\"content\":\"hi\"}]"
history_summary:
type: string
description: "用于增量更新的先前摘要(可选,默认为空)"
required: [chat_list]


对话摘要 - 助手使用说明

使用此技能为对话内容生成摘要。

何时使用此技能

当用户出现以下情况时,请激活此技能:
- 要求总结对话内容
- 想了解讨论过的话题
- 需要回顾聊天历史
- 提及类似“总结一下”、“recap”、“我们刚才聊了什么”等表述

如何执行

当用户需要对话摘要时,请执行以下命令:

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}"}'

参数说明

chat_list(必需):
- 必须是有效的 JSON 字符串
- 格式:[{"role":"user","content":"消息内容"},{"role":"assistant","content":"回复内容"}]
- 请收集对话历史并将其格式化为 JSON

history_summary(可选):
- 用于增量更新的先前摘要文本
- 若无先前摘要,请传递空字符串 ""

使用示例

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": ""}'

响应处理

API 返回 JSON 格式数据:

{
  "code": 0,
  "message": "success",
  "data": {
    "summary": "生成的摘要文本..."
  }
}
  • code 为 0:提取 data.summary 并展示给用户
  • code 不为 0:将 message 中的错误信息反馈给用户

重要提示

  1. 请确保 JSON 字符串中的引号正确转义
  2. chatList 必须是包含 JSON 的字符串,而非原始 JSON 对象
  3. 调用此 API 前,请先收集最近的对话历史
20 次点击  ∙  0 人收藏  
登录后收藏  
0 条回复
关于 ·  帮助 ·  PING ·  隐私 ·  条款   
OA0 - Omni AI 0 一个探索 AI 的社区
沪ICP备2024103595号-2
耗时 13 ms
Developed with Cursor