智能体对话
POST
/api/agent/5a5eee86-1991-43e5-b043-996b34bf7f68/chat
求参数
Header 参数
Body 参数application/json
示例
{"message":"甲方是谁?","stream":true,"includeContext":true,"includeReferences":true,"modelId":"26c7120b-c03c-4eed-86ae-1b12e906e02c","datasetIds":["9a441ce8-dee3-47d8-93bf-81b3a7136064","f0131934-3ee3-4743-9e48-393fba359896"]}求示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
求示例求示例
Shell
JavaScript
Java
Swift
curl--location'http://prod-cn.your-api-server.com/api/agent/5a5eee86-1991-43e5-b043-996b34bf7f68/chat'\--header'Authorization: Bearer {{token}}'\--header'Content-Type: application/json'\--data'{ "message": "甲方是谁?", "stream": true, "includeContext": true, "includeReferences": true, "modelId": "26c7120b-c03c-4eed-86ae-1b12e906e02c", "datasetIds": ["9a441ce8-dee3-47d8-93bf-81b3a7136064", "f0131934-3ee3-4743-9e48-393fba359896"]
}'返回响应
🟢201成功
application/json
Bodyapplication/json
示例
{"code":0,"message":"string","data":{"conversationId":"string","response":"string","responseTime":0,"tokenUsage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0},"referenceSources":[{"datasetId":"string","datasetName":"string","chunks":[{"id":"string","content":"string","score":0,"metadata":{"fileId":"string","fileUrl":"string","fileName":"string","filePath":"string","fileSize":"string","fileType":"string","mimeType":"string","extension":"string","storageName":"string"},"fileName":"string","chunkIndex":0}]}],"context":[{"role":"string","content":"string","timestamp":"string"}]},"timestamp":0}修改于2026-05-25 07:28:35
共 319 篇文档 · 内容同步自官方帮助中心