docs: document streaming SSE events for chat and chatflow APIs#793
Open
RiskeyL wants to merge 2 commits into
Open
docs: document streaming SSE events for chat and chatflow APIs#793RiskeyL wants to merge 2 commits into
RiskeyL wants to merge 2 commits into
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the OpenAPI specs’ text/event-stream documentation for the Send Chat Message endpoint to better describe SSE parsing, the stream lifecycle, and the concrete event catalog across Chat and Chatflow APIs, and syncs these updates to Chinese/Japanese translations. It also corrects the documented ChatCompletionResponse.mode value for Agent apps.
Changes:
- Rewrites the streaming (
text/event-stream) response descriptions for Chat and Chatflow to include parsing rules, lifecycle, and event tables (including Human Input pause/resume flow for Chatflow). - Updates
ChatCompletionResponse.modedocs to reflectagent-chatfor Agent apps (instead of alwayschat). - Syncs equivalent updates across
en/,zh/, andja/OpenAPI JSON specs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| en/api-reference/openapi_chat.json | Expands Chat SSE streaming documentation and updates mode description. |
| en/api-reference/openapi_chatflow.json | Expands Chatflow SSE streaming documentation (workflow/node/human-input events). |
| zh/api-reference/openapi_chat.json | Chinese sync of Chat SSE streaming documentation and mode description. |
| zh/api-reference/openapi_chatflow.json | Chinese sync of Chatflow SSE streaming documentation (workflow/node/human-input events). |
| ja/api-reference/openapi_chat.json | Japanese sync of Chat SSE streaming documentation and mode description. |
| ja/api-reference/openapi_chatflow.json | Japanese sync of Chatflow SSE streaming documentation (workflow/node/human-input events). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Issue #791 reported that the streaming API response structure is documented inconsistently between Agent and Chatflow. While investigating, the Chat/Agent streaming docs turned out to reference a
ChunkChatEventschema that does not exist, and themodefield was documented as alwayschat, which is wrong for Agent apps.This PR reworks the streaming (
text/event-stream) response documentation for the send-chat-message endpoint in both specs and aligns their structure.Changes
ChunkChatEventreference with a code-verified event catalog, grouped into Reply, Workflow and node, and Transport tables.ChatCompletionResponse.modefield: it returnsagent-chatfor Agent apps, not alwayschat.Close #791