调用本接口发起 V4 智能问答,支持企业知识、个人知识、本体语义、知识图谱、附件、联网搜索和深度思考,并以 SSE 流式返回结果。
Object 类型请求体,包含参数说明如下表所示。
参数名 | 类型 | 是否必传 | 描述 |
|---|---|---|---|
conversation_id | String | 否 | 会话 ID;为空时自动创建。 |
chat_id | String | 否 | 本轮聊天 ID;为空时自动生成。 |
regenerate_from_chat_id | String | 否 | 重新生成时关联的原聊天 ID。 |
qa_kb_ids | Array | 否 | 合并到 knowledge_scope 后传给 master-control 的 QA 知识库 ID 列表。 |
qa_doc_ids | Array | 否 | 合并到 knowledge_scope 后传给 master-control 的 QA 文档 ID 列表。 |
qa_folder_ids | Array | 否 | 合并到 knowledge_scope 后传给 master-control 的 QA 文件夹 ID 列表。 |
term_kb_ids | Array | 否 | 合并到 knowledge_scope 后传给 master-control 的术语知识库 ID 列表。 |
term_doc_ids | Array | 否 | 合并到 knowledge_scope 后传给 master-control 的术语文档 ID 列表。 |
term_folder_ids | Array | 否 | 合并到 knowledge_scope 后传给 master-control 的术语文件夹 ID 列表。 |
graph_ids | Array | 否 | 兼容字段;新请求请通过 knowledge_graph_scope 传入知识图谱 ID。 |
ontology_ids | Array | 否 | 兼容字段;新请求请通过 ontology_scope 传入字符串型本体 ID。 |
metadata | Object | 否 | 运行时扩展参数。 |
stream | Enum | 否 | 兼容字段;当前接口始终以 SSE 流式返回。 |
messages | Array | 是 | 消息列表;当前仅消费最后一条消息,且其 role 必须为 user、文本内容不能为空。详情请参见下文 messages 表 |
参数名 | 类型 | 是否必传 | 描述 |
|---|---|---|---|
role | String | 是 | 消息角色;要求最后一条消息的角色为 user
|
message_type | String | 否 | 消息类型;智能问答请求使用 question |
content_type | String | 否 | 消息内容类型;text 表示纯文本,mixed 表示包含多种能力项 |
content | String 或 Object | 是 | 文本问题,或包含 items 的 mixed 内容对象。 |
响应结果为 Object 类型。