Skip to content

Commit

Permalink
feat(types): improve params type names
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Sep 19, 2023
1 parent e22f0e7 commit 34ef41c
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/anthropic/types/completion_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
__all__ = [
"CompletionRequestStreamingMetadata",
"CompletionRequestNonStreamingMetadata",
"CompletionCreateParamsBase",
"Metadata",
"CompletionRequestNonStreaming",
"CompletionRequestStreaming",
"CompletionCreateParamsBase",
"Metadata",
"CompletionCreateParamsNonStreaming",
"CompletionCreateParamsStreaming",
]


Expand Down Expand Up @@ -94,7 +96,7 @@ class Metadata(TypedDict, total=False):
"""


class CompletionRequestNonStreaming(CompletionCreateParamsBase):
class CompletionCreateParamsNonStreaming(CompletionCreateParamsBase):
stream: Literal[False]
"""Whether to incrementally stream the response using server-sent events.
Expand All @@ -104,7 +106,7 @@ class CompletionRequestNonStreaming(CompletionCreateParamsBase):
"""


class CompletionRequestStreaming(CompletionCreateParamsBase):
class CompletionCreateParamsStreaming(CompletionCreateParamsBase):
stream: Required[Literal[True]]
"""Whether to incrementally stream the response using server-sent events.
Expand All @@ -120,4 +122,10 @@ class CompletionRequestStreaming(CompletionCreateParamsBase):
CompletionRequestNonStreamingMetadata = Metadata
"""This is deprecated, `Metadata` should be used instead"""

CompletionCreateParams = Union[CompletionRequestNonStreaming, CompletionRequestStreaming]
CompletionRequestNonStreaming = CompletionCreateParamsNonStreaming
"""This is deprecated, `CompletionCreateParamsNonStreaming` should be used instead"""

CompletionRequestStreaming = CompletionCreateParamsStreaming
"""This is deprecated, `CompletionCreateParamsStreaming` should be used instead"""

CompletionCreateParams = Union[CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming]

0 comments on commit 34ef41c

Please sign in to comment.