检索对话中已发送的消息
开发环境
开发环境
GET
api/v1/projects/{projectId}/conversations/{sessionId}/messages
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://dev-cn.your-api-server.comapi/v1/projects//conversations//messages?page=1&order=desc' \
--header 'authorization;'
响应示例响应示例
200 - 成功示例
{
"status": "success",
"data": {
"conversation": {
"created_at": "2023-04-30 16:43:53",
"updated_at": "2023-04-30 16:43:53",
"deleted_at": "2023-04-30 16:43:53",
"id": 1,
"name": "Conversation 1",
"project_id": 1,
"created_by": 1,
"session_id": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002"
},
"messages": {
"current_page": 1,
"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"
}
}
],
"first_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
"next_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
"path": "https://app.customgpt.ai/api/v1/users?page=1",
"per_page": 10,
"prev_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
"to": 1,
"total": 1
}
}
}
请求参数
Path 参数
projectId
string
必需
sessionId
string
必需
Query 参数
page
string
返回的页码
示例值:
1
order
string
可选
示例值:
desc
Header 参数
authorization
string
必需
返回响应
修改于 2024-02-22 05:47:25