跳转到主要内容
GET
/
messages
Error
A valid request URL is required to generate request examples
{
  "limit": 123,
  "has_more": true,
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "inputs": {},
      "query": "<string>",
      "answer": "<string>",
      "message_files": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "type": "<string>",
          "url": "<string>",
          "belongs_to": "user"
        }
      ],
      "feedback": {
        "rating": "like"
      },
      "retriever_resources": [
        {
          "position": 123,
          "dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "dataset_name": "<string>",
          "document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "document_name": "<string>",
          "segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "score": 123,
          "content": "<string>"
        }
      ],
      "created_at": 123
    }
  ]
}

授权

Authorization
string
header
必填

API Key 认证。

查询参数

conversation_id
string
必填

会话 ID。

user
string
必填

用户标识符。注意:Service API 不与 WebApp 共享会话。通过 API 创建的会话与在 WebApp 界面中创建的会话是隔离的。

first_id
string

当前页面第一条聊天记录的 ID(用于分页)。

limit
integer
默认值:20

每页条目数。

响应

200 - application/json

成功获取会话历史。

limit
integer
has_more
boolean
data
object[]