Authorization: Bearer ********************{
"messages": [
{
"role": "string",
"content": "string",
"agent": "string",
"metadata": {
"property1": "string",
"property2": "string"
}
}
],
"stream": true,
"sessionId": 0,
"debug": false,
"useContext": true,
"execLogicform": false,
"plaintext": false,
"learned": [
{}
],
"customFunctions": [
{}
]
}curl --location '/agent:chat' \
--header 'X-SPACES: default' \
--header 'X-SPACES: {{space}}' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "string",
"content": "string",
"agent": "string",
"metadata": {
"property1": "string",
"property2": "string"
}
}
],
"stream": true,
"sessionId": 0,
"debug": false,
"useContext": true,
"execLogicform": false,
"plaintext": false,
"learned": [
{}
],
"customFunctions": [
{}
]
}'stream=false 时返回 JSON;默认为 SSE 流式响应,内容类型为 text/event-stream。{
"id": "string",
"object": "string",
"created": 0,
"model": "string",
"choices": [
{}
]
}