Skip to main content
GET
List Conversation Messages

获取对话消息列表

URL: /v1/agent/conversations/{conversation_id}/messages
方法: GET
描述: 获取指定对话的消息列表,支持分页查询。

路径参数

查询参数

响应参数

消息对象结构

示例代码

cURL 示例

cURL 示例(分页查询)

Python 示例

Python 示例(分页查询)

响应示例

注意事项

  • 消息按创建时间倒序排列(最新的消息在前)
  • 使用 before_message_id 参数可以实现向前翻页
  • limit 参数的有效范围为 1-100
  • 建议每次请求不超过 50 条消息,以获得更好的性能

Authorizations

Authorization
string
header
required

Enter your Bearer token

Path Parameters

conversation_id
integer
required

对话 ID

Query Parameters

limit
integer
default:10

返回的消息数量 Number of messages to return

Required range: 1 <= x <= 100
before_message_id
integer

获取此消息 ID 之前创建的消息 Fetch messages created before this message id

Response

Successful Response

messages
OAIAgentConversationMessageRead · object[]

消息列表