Skip to main content
GET
/
v1
/
agent
/
conversations
/
{conversation_id}
Get Conversation
curl --request GET \
  --url https://api.reportify.cn/v1/agent/conversations/{conversation_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": 123456789,
  "user_id": 987654321,
  "agent_id": 11887655289749510,
  "type": "agent_chat",
  "title": "nvidia 最新业绩分析",
  "status": "active",
  "created_at": 1765851195760,
  "updated_at": 1765851195768
}

获取智能体对话详情

URL: /v1/agent/conversations/{conversation_id}
方法: GET
描述: 获取指定智能体对话的详细信息。

路径参数

参数名类型必填描述
conversation_idinteger对话 ID

响应参数

参数名类型描述
idinteger对话 ID
user_idinteger用户 ID
agent_idinteger智能体 ID
typestring对话类型
titlestring对话标题
statusstring对话状态
metaobject元数据
created_atinteger创建时间戳(毫秒)
updated_atinteger更新时间戳(毫秒)
last_messageobject最后一条消息

示例代码

cURL 示例

curl -X GET "https://api.example.com/v1/agent/conversations/683242877840089" \
  -H "Authorization: Bearer YOUR_API_KEY"

Python 示例

import requests

url = "https://api.example.com/v1/agent/conversations/683242877840089"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
data = response.json()

print(f"对话标题: {data['title']}")
print(f"对话状态: {data['status']}")
print(f"创建时间: {data['created_at']}")

响应示例

{
  "id": 683242877840089,
  "user_id": 987654321,
  "agent_id": 11887655289749510,
  "type": "agent_chat",
  "title": "nvidia 最新业绩分析",
  "status": "active",
  "meta": {},
  "created_at": 1765851195760,
  "updated_at": 1765851195768,
  "last_message": {
    "id": 123,
    "role": "assistant",
    "content": "...",
    "created_at": 1765851195768
  }
}

注意事项

  • conversation_id 可从创建对话接口的响应中获取
  • created_atupdated_at 为毫秒级时间戳
  • last_message 字段包含对话中最后一条消息的信息

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

conversation_id
integer
required

对话 ID

Response

Successful Response

Agent 对话详情

id
integer
required

对话 ID

Example:

123456789

user_id
integer
required

用户 ID

Example:

987654321

agent_id
integer
required

智能体 ID

Example:

11887655289749510

type
string
required

对话类型

Example:

"agent_chat"

status
string
required

对话状态

Example:

"active"

created_at
integer
required

创建时间戳(毫秒)

Example:

1765851195760

updated_at
integer
required

更新时间戳(毫秒)

Example:

1765851195768

title
string

对话标题

Example:

"nvidia 最新业绩分析"

meta
Meta · object

元数据

last_message
Last Message · object

最后一条消息