Skip to content

Only include stream_options when streaming #519

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

Merged
merged 1 commit into from
Apr 15, 2025
Merged

Only include stream_options when streaming #519

merged 1 commit into from
Apr 15, 2025

Conversation

rm-openai
Copy link
Collaborator

@rm-openai rm-openai commented Apr 15, 2025

Closes #518

@@ -591,8 +593,11 @@ def get_store_param(cls, client: AsyncOpenAI, model_settings: ModelSettings) ->

@classmethod
def get_stream_options_param(
cls, client: AsyncOpenAI, model_settings: ModelSettings
cls, client: AsyncOpenAI, model_settings: ModelSettings, stream: bool
Copy link
Contributor

@pakrym-oai pakrym-oai Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uber nit: isn't it easier to do _Converter.get_stream_options_param() if stream else None in the method above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO no because this way the logic for stream_options is all in one place

@rm-openai rm-openai merged commit e625cb4 into main Apr 15, 2025
5 checks passed
@rm-openai rm-openai deleted the rm/pr519 branch April 15, 2025 16:48
@rm-openai rm-openai mentioned this pull request Apr 15, 2025
rm-openai added a commit that referenced this pull request Apr 15, 2025
New release, to incorporate #519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Model stream error when running in Docker
2 participants