Skip to content

fix(types): correctly mark stream discriminator as optional #1706

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
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/openai/types/beta/thread_create_and_run_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class TruncationStrategy(TypedDict, total=False):
"""


class ThreadCreateAndRunParamsNonStreaming(ThreadCreateAndRunParamsBase):
class ThreadCreateAndRunParamsNonStreaming(ThreadCreateAndRunParamsBase, total=False):
stream: Optional[Literal[False]]
"""
If `true`, returns a stream of events that happen during the Run as server-sent
Expand Down
2 changes: 1 addition & 1 deletion src/openai/types/beta/threads/run_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class TruncationStrategy(TypedDict, total=False):
"""


class RunCreateParamsNonStreaming(RunCreateParamsBase):
class RunCreateParamsNonStreaming(RunCreateParamsBase, total=False):
stream: Optional[Literal[False]]
"""
If `true`, returns a stream of events that happen during the Run as server-sent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ToolOutput(TypedDict, total=False):
"""


class RunSubmitToolOutputsParamsNonStreaming(RunSubmitToolOutputsParamsBase):
class RunSubmitToolOutputsParamsNonStreaming(RunSubmitToolOutputsParamsBase, total=False):
stream: Optional[Literal[False]]
"""
If `true`, returns a stream of events that happen during the Run as server-sent
Expand Down
2 changes: 1 addition & 1 deletion src/openai/types/chat/completion_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class Function(TypedDict, total=False):
ResponseFormat: TypeAlias = Union[ResponseFormatText, ResponseFormatJSONObject, ResponseFormatJSONSchema]


class CompletionCreateParamsNonStreaming(CompletionCreateParamsBase):
class CompletionCreateParamsNonStreaming(CompletionCreateParamsBase, total=False):
stream: Optional[Literal[False]]
"""If set, partial message deltas will be sent, like in ChatGPT.

Expand Down
2 changes: 1 addition & 1 deletion src/openai/types/completion_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class CompletionCreateParamsBase(TypedDict, total=False):
"""


class CompletionCreateParamsNonStreaming(CompletionCreateParamsBase):
class CompletionCreateParamsNonStreaming(CompletionCreateParamsBase, total=False):
stream: Optional[Literal[False]]
"""Whether to stream back partial progress.

Expand Down