1717from  .chat_stream_end_event_finish_reason  import  ChatStreamEndEventFinishReason 
1818from  .non_streamed_chat_response  import  NonStreamedChatResponse 
1919from  .tool_call  import  ToolCall 
20+ from  .tool_call_delta  import  ToolCallDelta 
2021
2122
2223class  StreamedChatResponse_StreamStart (UncheckedBaseModel ):
@@ -160,6 +161,7 @@ class StreamedChatResponse_ToolCallsGeneration(UncheckedBaseModel):
160161    StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). 
161162    """ 
162163
164+     text : typing .Optional [str ] =  None 
163165    tool_calls : typing .List [ToolCall ]
164166    event_type : typing .Literal ["tool-calls-generation" ] =  "tool-calls-generation" 
165167
@@ -210,6 +212,33 @@ class Config:
210212        json_encoders  =  {dt .datetime : serialize_datetime }
211213
212214
215+ class  StreamedChatResponse_ToolCallsChunk (UncheckedBaseModel ):
216+     """ 
217+     StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). 
218+     """ 
219+ 
220+     tool_call_delta : ToolCallDelta 
221+     event_type : typing .Literal ["tool-calls-chunk" ] =  "tool-calls-chunk" 
222+ 
223+     def  json (self , ** kwargs : typing .Any ) ->  str :
224+         kwargs_with_defaults : typing .Any  =  {"by_alias" : True , "exclude_unset" : True , ** kwargs }
225+         return  super ().json (** kwargs_with_defaults )
226+ 
227+     def  dict (self , ** kwargs : typing .Any ) ->  typing .Dict [str , typing .Any ]:
228+         kwargs_with_defaults_exclude_unset : typing .Any  =  {"by_alias" : True , "exclude_unset" : True , ** kwargs }
229+         kwargs_with_defaults_exclude_none : typing .Any  =  {"by_alias" : True , "exclude_none" : True , ** kwargs }
230+ 
231+         return  deep_union_pydantic_dicts (
232+             super ().dict (** kwargs_with_defaults_exclude_unset ), super ().dict (** kwargs_with_defaults_exclude_none )
233+         )
234+ 
235+     class  Config :
236+         frozen  =  True 
237+         smart_union  =  True 
238+         extra  =  pydantic_v1 .Extra .allow 
239+         json_encoders  =  {dt .datetime : serialize_datetime }
240+ 
241+ 
213242StreamedChatResponse  =  typing_extensions .Annotated [
214243    typing .Union [
215244        StreamedChatResponse_StreamStart ,
@@ -219,6 +248,7 @@ class Config:
219248        StreamedChatResponse_CitationGeneration ,
220249        StreamedChatResponse_ToolCallsGeneration ,
221250        StreamedChatResponse_StreamEnd ,
251+         StreamedChatResponse_ToolCallsChunk ,
222252    ],
223253    UnionMetadata (discriminant = "event_type" ),
224254]
0 commit comments