Repository navigation
Python: Correct ChatKit guide streaming arguments - #9523
Open
LI (ktz03) wants to merge 1 commit into
Open
LI (ktz03) wants to merge 1 commit into
LI (ktz03) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The documentation-only correction matches the existing API contract, with no unresolved findings.
No open issues 🎉
What changed in this PR
Corrects the Python ChatKit guide’s streaming example to match the existing helper API and package README.
Changes:
- Creates a response stream with
agent.run(messages, stream=True). - Passes that stream and
thread_idtostream_agent_response.
| File | Description |
|---|---|
python/packages/chatkit/AGENTS.md |
Corrects streaming arguments in the usage example. |
Review effort: Balanced
This branch was successfully deployed
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.
Motivation & Context
The ChatKit package agent guide passes an Agent and a message list to
stream_agent_response. The helper instead accepts a stream of AgentResponseUpdate objects and a ChatKit thread ID, so the documented call raises TypeError before any model/client call.Description & Review Guide
agent.run(messages, stream=True)first, then pass that response stream andthread_idto the ChatKit helper.Related Issue
N/A - trivial change. This corrects an unambiguous example call to the existing API, matching the package README; no behavior, API or new guidance principle is introduced. The original integration and guide authors in #1273, #2174 and #3644 retain their contributions.
AI Assistance
AI assistance details: Documentation, example verification, and this PR description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.