GET
/
messages
{
  "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
    }
  ]
}

Authorizations

Authorization
string
header
required

API-Key 鉴权。所有 API 请求都应在 Authorization HTTP Header 中包含您的 API-Key,格式为:Bearer {API_KEY}。强烈建议开发者把 API-Key 放在后端存储,而非客户端,以免泄露。

Query Parameters

conversation_id
string
required

会话 ID。

user
string
required

用户标识,由开发者定义规则,需保证用户标识在应用内唯一。

first_id
string | null

当前页第一条聊天记录的 ID,默认 null。

limit
integer
default:20

一次请求返回多少条记录,默认 20 条。

Response

200 - application/json

成功获取会话历史消息。

The response is of type object.