-
Notifications
You must be signed in to change notification settings - Fork 325
Add streaming support for Responses API #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add streaming support for Responses API #405
Conversation
5463b37
to
318f248
Compare
I found a bug in my implementation. Please wait for my fix. |
2e6afd2
to
f59f582
Compare
Actually, it wasn’t a bug after all. However, I did spot an improvement, so I’ll open a separate PR for that. Could you please review this PR? |
f59f582
to
3f09cb0
Compare
Any timeline on when this will be merged? @64bit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some required changes.
Thank you for adding support for Response streaming - nice work on adding an example for testing too!
* Add streaming support for Responses API. * Update examples/responses-stream/src/main.rs * Update examples/responses-stream/src/main.rs * Update examples/responses-stream/src/main.rs * Delete async-openai/tests/responses.rs --------- Co-authored-by: Himanshu Neema <[email protected]>
* fix(types)!: change AssistantStreamEvent field name (64bit#400) BREAKING CHANGES: changed AssistantStreamEvent filed name * Fix typo in `ChatCompletionToolChoiceOption` docs (64bit#401) * feat: update image generation API to match latest OpenAI specs (64bit#402) * feat: update image generation API to match latest OpenAI specs - Add ImageModeration enum with 'auto' (default) and 'low' values - Add moderation parameter to CreateImageRequest for gpt-image-1 - Extend ImageQuality enum to support 'high', 'medium', 'low' for gpt-image-1 These changes align with the latest OpenAI API documentation for image generation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * add Auto to ImageQuality --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Himanshu Neema <[email protected]> * fix(deps): bump to [email protected] (64bit#409) Signed-off-by: Nick Mitchell <[email protected]> * feat: Add `minimal` reasoning effort for gpt-5 (64bit#411) * add Scale and Priority to ServiceTier (64bit#416) * Add streaming support for Responses API (64bit#405) * Add streaming support for Responses API. * Update examples/responses-stream/src/main.rs * Update examples/responses-stream/src/main.rs * Update examples/responses-stream/src/main.rs * Delete async-openai/tests/responses.rs --------- Co-authored-by: Himanshu Neema <[email protected]> * chore: Release * Add skip_serializing_if to more option types (64bit#412) Signed-off-by: John Howard <[email protected]> * Add Scale and Priority to the `ServiceTier` enum for the Responses API (64bit#419) * Fix schema of code interpreter call output (64bit#420) * chore: Release * fix: CompoundFilter should use CompoundType instead (64bit#429) * fix: Update `OutputItem` to align with OpenAI's Specification (64bit#426) * Update `OutputItem` to align with OpenAI's Specification * Update * chore: Release --------- Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: John Howard <[email protected]> Co-authored-by: posky <[email protected]> Co-authored-by: lazymio <[email protected]> Co-authored-by: Siyuan Yan <[email protected]> Co-authored-by: Claude <[email protected]> Co-authored-by: Himanshu Neema <[email protected]> Co-authored-by: Nick Mitchell <[email protected]> Co-authored-by: Timon Vonk <[email protected]> Co-authored-by: Kevin Zimmerman <[email protected]> Co-authored-by: Kazzix <[email protected]> Co-authored-by: John Howard <[email protected]> Co-authored-by: Advayp <[email protected]> Co-authored-by: the-spice-must-flow <[email protected]> Co-authored-by: Ben Levin <[email protected]>
* Add streaming support for Responses API. * Update examples/responses-stream/src/main.rs * Update examples/responses-stream/src/main.rs * Update examples/responses-stream/src/main.rs * Delete async-openai/tests/responses.rs --------- Co-authored-by: Himanshu Neema <[email protected]> (cherry picked from commit 70dec49) # Conflicts: # async-openai-wasm/src/responses.rs
Added a streaming support for Responses API.
The most of these changes are for Streaming Response types.
I referenced this document https://platform.openai.com/docs/api-reference/responses-streaming/response