新增 SSE 事件参考页并补全事件类型说明#1176
Closed
lvwxx wants to merge 2 commits into
Closed
Conversation
lvwxx
commented
Jul 21, 2026
Member
- 新增 docs/{en,zh-CN,zh-HK}/docs/portai/chat/events.md,逐一列出 chat/workflow 生命周期、message、thinking、node_tool_use、subagent、agent_tool、human_interaction_required 及辅助事件的字段表与示例
- 说明帧格式信封结构:SSE event 恒为 message,客户端应按 data.event 分发并忽略未知事件以保持向前兼容
- 给出成功/中断/失败三种典型事件序列,并注明中断运行不发 workflow_finished、恢复时不再发 workflow_started
- conversation.md 的流式示例中 workflow_run_id 由占位符 wr_... 修正为真实格式的数字字符串 745910371102313,并添加指向 events 页的链接
- 三语言页面 sidebar_position 均为 4,紧随 continue(3)之后
added 2 commits
July 3, 2026 12:43
- 新增 conversation.md 描述发起对话接口 POST /v1/babbage/agents/:id/conversations,含阻塞式与 SSE 流式两种响应模式及请求示例 - 新增 continue.md 描述继续对话接口,覆盖 answers_by_tool_call 结构、多次中断续跑及归属校验规则 - conversation.md 提供 conversation_response schema,含 interrupt 中断结构(node_id、tool_call_id、questions)与 error 字段说明 - 新增 portai 与 chat 目录的 _category_.json,配置 sidebar 位置(2.7)、cpu 图标与分组标签 - en / zh-CN / zh-HK 三语言目录同步创建,内容与结构保持一致
- 新增 docs/{en,zh-CN,zh-HK}/docs/portai/chat/events.md,逐一列出 chat/workflow 生命周期、message、thinking、node_tool_use、subagent、agent_tool、human_interaction_required 及辅助事件的字段表与示例
- 说明帧格式信封结构:SSE event 恒为 message,客户端应按 data.event 分发并忽略未知事件以保持向前兼容
- 给出成功/中断/失败三种典型事件序列,并注明中断运行不发 workflow_finished、恢复时不再发 workflow_started
- conversation.md 的流式示例中 workflow_run_id 由占位符 wr_... 修正为真实格式的数字字符串 745910371102313,并添加指向 events 页的链接
- 三语言页面 sidebar_position 均为 4,紧随 continue(3)之后
sunli829
added a commit
to longbridge/openapi
that referenced
this pull request
Jul 21, 2026
…ents Extends the AI Agent conversation domain to match longbridge/developers#1176, which publishes complete SSE event documentation for the first time. Adds 14 new ConversationStreamEvent variants across Rust core and every binding (C/C++/Python/Node.js/Java): thinking phase (ThinkingStarted/Finished), tool calls (NodeToolUseStarted/Finished), subagent delegation (SubagentStarted/Progress/Finished), agent-as-tool delegation (AgentToolStarted/Progress/Finished), and auxiliary events (QueryMasked, PlanChanged, ContextCompressStarted/Finished). Also enriches MessagePayload with type/key/stage fields and WorkflowFinishedPayload with top-level error/error_code/error_message/error_args/process_data fields, per the docs. Fixes a real bug uncovered by the new docs: an interrupted run's SSE stream never emits WorkflowFinished at all (only human_interaction_required, then chat_finished) — previously every binding's "drive the stream to completion" helper would error out on any interrupted streaming conversation. Adds HumanInteractionRequired as a first-class terminal variant (carrying the same synthesized ConversationResponse WorkflowFinished carries) and fixes drive_conversation_stream to treat it as terminal alongside WorkflowFinished.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.