{
"messages": [
{
"role": "string",
"content": "string"
}
],
"doc_ids": [
"string"
],
"prompt_id": "string",
"model": "string",
"limit": 0,
"threshold": 0,
"temperature": null,
"stream": true
}
curl --location -g --request POST '/v1/knowledge-bases/{{index_id}}/chat/completions' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"messages": [
{
"role": "string",
"content": "string"
}
],
"doc_ids": [
"string"
],
"prompt_id": "string",
"model": "string",
"limit": 0,
"threshold": 0,
"temperature": null,
"stream": true
}'
{
"choices": [
{
"finish_reason": null,
"index": 0,
"message": {
"content": "您可以使用遥控器或通过App内的语音控制页面来开启和关闭空调。如果您需要输入新的指令,需要重新唤醒空调。",
"role": "assistant"
}
}
],
"created": 1692107109,
"id": "cht000bcd39@dx189f97169419a4b540",
"object": "chat.completion",
"usage": {
"completion_tokens": 72,
"prompt_tokens": 943,
"question_tokens": 943,
"total_tokens": 1015
}
}