向对话发送消息
开发环境
开发环境
POST
api/v1/projects/{projectId}/conversations/{sessionId}/messages
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.comapi/v1/projects//conversations//messages?stream=false&lang=en' \
--header 'authorization;' \
--header 'content-type: application/json' \
--data-raw '{
"response_source": "default"
}'
响应示例响应示例
200 - 成功示例
{
"status": "success",
"data": {
"id": 1,
"user_id": 1,
"user_query": "What is the meaning of life?",
"openai_response": "The meaning of life is to be happy.",
"created_at": "2021-01-01 00:00:00",
"updated_at": "2021-01-01 00:00:00",
"conversation_id": 1,
"citations": [
1,
2,
3
],
"metadata": {
"user_ip": "127.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)",
"external_id": "ext_id_1234567890",
"request_source": "web"
}
}
}
请求参数
Path 参数
projectId
string
必需
sessionId
string
必需
Query 参数
stream
string
可选
示例值:
false
lang
string
可选
示例值:
en
Header 参数
content-type
string
必需
示例值:
application/json
authorization
string
必需
Body 参数application/json
返回响应
修改于 2024-02-22 05:47:26