File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,11 +22,11 @@ class ChatCompletionChunkTypedDict(TypedDict):
2222 r"""The model used for the chat completion."""
2323 id : str
2424 r"""The unique identifier for the chat completion."""
25- system_fingerprint : str
25+ system_fingerprint : str | None = None
2626 r"""The system fingerprint for the chat completion."""
27- usage : UsageTypedDict
27+ usage : UsageTypedDict | None = None
2828 r"""The usage information for the chat completion."""
29- service_tier : str
29+ service_tier : str | None = None
3030 r"""The service tier for the chat completion."""
3131
3232
@@ -43,15 +43,12 @@ class ChatCompletionChunk(BaseModel):
4343 model : str
4444 r"""The model used for the chat completion."""
4545
46- id : str
47- r"""The unique identifier for the chat completion."""
48-
49- system_fingerprint : str
46+ system_fingerprint : str | None = None
5047 r"""The system fingerprint for the chat completion."""
5148
52- usage : Usage
49+ usage : Usage | None = None
5350 r"""The usage information for the chat completion."""
5451
55- service_tier : str
52+ service_tier : str | None = None
5653 r"""The service tier for the chat completion."""
5754
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ class ChatCompletionResponseTypedDict(TypedDict):
2121 system_fingerprint : NotRequired [Nullable [str ]]
2222 r"""The system fingerprint for the completion, if applicable."""
2323 usage : NotRequired [Nullable [CompletionUsageTypedDict ]]
24+ r"""The usage information for the chat completion."""
25+ service_tier : NotRequired [Nullable [str ]]
26+ r"""The service tier for the chat completion."""
27+ object : NotRequired [Nullable [str ]]
28+ r"""The object type for the chat completion."""
2429
2530
2631class ChatCompletionResponse (BaseModel ):
@@ -40,6 +45,13 @@ class ChatCompletionResponse(BaseModel):
4045 r"""The system fingerprint for the completion, if applicable."""
4146
4247 usage : OptionalNullable [CompletionUsage ] = UNSET
48+ r"""The usage information for the chat completion."""
49+
50+ service_tier : OptionalNullable [str ] = UNSET
51+ r"""The service tier for the chat completion."""
52+
53+ object : OptionalNullable [str ] = UNSET
54+ r"""The object type for the chat completion."""
4355
4456 @model_serializer (mode = "wrap" )
4557 def serialize_model (self , handler ):
You can’t perform that action at this time.
0 commit comments