Get assistant message events (streaming or non-streaming) from a specific offset
/v1/agent/conversations/{conversation_id}/messages/{assistant_message_id}
方法: GET
描述: 获取指定助手消息的所有事件,支持从指定的 offset 开始批量获取,可选择流式(SSE)或非流式(JSON)响应模式。
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| conversation_id | integer | 是 | 对话 ID |
| assistant_message_id | string | 是 | 助手消息 ID(从 chat 接口响应头 X-REPORTIFY-ASSISTANT-MESSAGE-ID 获取) |
| 参数名 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| stream | boolean | 否 | true | 是否使用流式响应(SSE) |
| timeout | integer | 否 | 1800 | 流式模式的超时时间(秒) |
| from_offset | integer | 否 | 0 | 从指定偏移量开始获取事件(最小值:0) |
text/event-stream 格式的 SSE 流,每个事件的结构与 智能体对话聊天接口 相同。
| 参数名 | 类型 | 描述 |
|---|---|---|
| assistant_events | array | 事件列表,每个元素为 WorkflowStreamEvent |
assistant_message_id 可从对话聊天接口(stream=true)的 HTTP 响应头 X-REPORTIFY-ASSISTANT-MESSAGE-ID 中获取from_offset 参数用于指定从哪个偏移量开始获取事件,可以用于断点续传Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
对话 ID
助手消息 ID(从 chat 接口响应头 X-REPORTIFY-ASSISTANT-MESSAGE-ID 获取)
是否使用流式响应(SSE) Stream events via SSE when true
流式模式的超时时间(秒) Timeout in seconds for streaming mode
从指定偏移量开始获取事件 Start streaming from specific offset
x >= 0Successful Response (Server-Sent Events stream or JSON array)
工作流流式事件对象
唯一事件标识符
"019b24ef23a1f4da18256b402868fae31764"
事件类型
init, workflow_start, workflow_end, node_start, node_end, agent_start, agent_end, tool_start, tool_end, stream_start, streaming, stream_end, usage, cancel, error "init"
事件时间戳(毫秒)
1765851210657
响应标识符,用于分组事件
"019b24ef238cc97730971a9a0080c99c"
工作流标识符
"11887655289749510"
执行标识符
"1dfccd9d-c365-4b7a-adae-aa9123684ec4"
运行标识符,用于关联一组 start 和 end 事件(如 workflow_start 和 workflow_end、tool_start 和 tool_end),用于分组相关的开始/结束事件对
""
节点标识符
节点显示名称
节点类型(start, tool, agent, end)
智能体标识符
智能体显示名称
智能体类型(builtin_agent, react_agent 等)
工具标识符
工具显示名称
组件的输入数据
{
"query": "NVIDIA AMD Intel GPU 半导体 最新动态",
"symbols": ["US:NVDA", "US:AMD", "US:INTC"],
"start_datetime": "2025-12-15T00:00:00",
"end_datetime": "2025-12-16T02:14:15",
"num": 15,
"filetype": "json"
}组件的输出数据。
{
"content": "{\"docs\": [{\"doc_id\": \"1197862772277383168\", \"title\": \"示例文档\"}], \"total_count\": 10}"
}事件内容(用于思考/流式输出)
""
错误信息(如果事件类型为 error)
事件偏移量
9195