
    2h`x                    8   S SK Jr  S SKrS SKJr  S SKJrJrJrJ	r	J
r
JrJrJr  S SKJrJrJr  S SKJr  SSKJrJrJr  SS	KJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$  S
SK%J&r&  SSKJ'r'J(r(J)r)  SSK*J+r+J,r,J-r-  SSK.J/r/  SSK0J1r1J2r2  SSK3J4r4J5r5J6r6J7r7J8r8J9r9J:r:  SSK;J<r<J=r=  SSK>J?r?J@r@JArA  SSKBJCrCJDrD  SSKEJFrF  SSKGJHrI  SSKJJKrL   " S S\\4   5      rM " S S\\4   5      rN " S S\\4   5      rO " S S \\4   5      rP " S! S"\\4   5      rQ " S# S$5      rRS'S% jrSS(S& jrTg))    )annotationsN)TracebackType)TYPE_CHECKINGAnyGenericCallableIterable	AwaitableAsyncIteratorcast)SelfIteratorassert_never)	from_json   )ParsedChoiceSnapshotParsedChatCompletionSnapshot#ParsedChatCompletionMessageSnapshot)
ChunkEventContentDoneEventRefusalDoneEventContentDeltaEventRefusalDeltaEventLogprobsContentDoneEventLogprobsRefusalDoneEventChatCompletionStreamEventLogprobsContentDeltaEventLogprobsRefusalDeltaEvent"FunctionToolCallArgumentsDoneEvent#FunctionToolCallArgumentsDeltaEvent   )accumulate_delta   )	NOT_GIVENIncExNotGiven)is_givenconsume_sync_iteratorconsume_async_iterator)
model_dump)buildconstruct_type   )ResponseFormatThas_parseable_inputmaybe_parse_contentparse_chat_completionget_input_tool_by_namesolve_response_format_tparse_function_tool_arguments)StreamAsyncStream)ChatCompletionChunkParsedChatCompletionChatCompletionToolParam)LengthFinishReasonErrorContentFilterFinishReasonError)ChoiceLogprobs)Choice)ResponseFormatc                      \ rS rSrSr        SS jrSS jrSS jrSS jr        SS jr	SS jr
SS	 jrSS
 jr\SS j5       rSS jrSrg)ChatCompletionStream/     Wrapper over the Chat Completions streaming API that adds helpful
events such as `content.done`, supports automatically parsing
responses & tool calls and accumulates a `ChatCompletion` object
from each individual chunk.

https://platform.openai.com/docs/api-reference/streaming
c               x    Xl         UR                  U l        U R                  5       U l        [        X#S9U l        g Nresponse_formatinput_tools_raw_streamresponse	_response
__stream__	_iteratorChatCompletionStreamState_stateself
raw_streamrF   rG   s       ^/var/www/auris/envauris/lib/python3.13/site-packages/openai/lib/streaming/chat/_completions.py__init__ChatCompletionStream.__init__8   1     &#,,*/i    c                6    U R                   R                  5       $ N)rM   __next__rQ   s    rS   rZ   ChatCompletionStream.__next__D   s    ~~&&((rW   c              #  :   #    U R                    H  nUv   M	     g 7frY   rM   rQ   items     rS   __iter__ChatCompletionStream.__iter__G   s     NNDJ #s   c                    U $ rY    r[   s    rS   	__enter__ChatCompletionStream.__enter__K   s    rW   c                $    U R                  5         g rY   closerQ   exc_typeexcexc_tbs       rS   __exit__ChatCompletionStream.__exit__N   s     	

rW   c                8    U R                   R                  5         gzr
Close the response and release the connection.

Automatically called if the response body is read to completion.
N)rK   ri   r[   s    rS   ri   ChatCompletionStream.closeV   s     	rW   c                V    U R                  5         U R                  R                  5       $ ).  Waits until the stream has been read to completion and returns
the accumulated `ParsedChatCompletion` object.

If you passed a class type to `.stream()`, the `completion.choices[0].message.parsed`
property will be the content deserialised into that class, if there was any content returned
by the API.

until_donerO   get_final_completionr[   s    rS   rw   )ChatCompletionStream.get_final_completion^   s!     	{{//11rW   c                    [        U 5        U $ )*Blocks until the stream has been consumed.)r(   r[   s    rS   rv   ChatCompletionStream.until_donei   s    d#rW   c                .    U R                   R                  $ rY   rO   current_completion_snapshotr[   s    rS   r~   0ChatCompletionStream.current_completion_snapshotn       {{666rW   c              #     #    U R                    H=  n[        U5      (       d  M  U R                  R                  U5      nU H  nUv   M	     M?     g 7frY   rI   $_is_valid_chat_completion_chunk_weakrO   handle_chunkrQ   	sse_eventevents_to_fireevents       rS   rL   ChatCompletionStream.__stream__r   sF     ))I7	BB![[55i@N' (	 *s   AArM   rI   rK   rO   N)rR   zStream[ChatCompletionChunk]rF   6type[ResponseFormatT] | ResponseFormatParam | NotGivenrG   ,Iterable[ChatCompletionToolParam] | NotGivenreturnNoner   z*ChatCompletionStreamEvent[ResponseFormatT])r   z4Iterator[ChatCompletionStreamEvent[ResponseFormatT]]r   r   rk   ztype[BaseException] | Nonerl   zBaseException | Nonerm   zTracebackType | Noner   r   r   r   r   z%ParsedChatCompletion[ResponseFormatT]r   r   )__name__
__module____qualname____firstlineno____doc__rT   rZ   ra   re   rn   ri   rw   rv   propertyr~   rL   __static_attributes__rd   rW   rS   r@   r@   /   s    
j 0
j P	
j
 B
j 

j), " %	
 
	2
 7 7rW   r@   c                  V    \ rS rSrSr        SS jrS	S jr        S
S jrSrg)ChatCompletionStreamManager{   a"  Context manager over a `ChatCompletionStream` that is returned by `.stream()`.

This context manager ensures the response cannot be leaked if you don't read
the stream to completion.

Usage:
```py
with client.chat.completions.stream(...) as stream:
    for event in stream:
        ...
```
c               6    S U l         Xl        X l        X0l        g rY   )$_ChatCompletionStreamManager__stream)_ChatCompletionStreamManager__api_request-_ChatCompletionStreamManager__response_format)_ChatCompletionStreamManager__input_toolsrQ   api_requestrF   rG   s       rS   rT   $ChatCompletionStreamManager.__init__   s     GK(!0(rW   c                    U R                  5       n[        UU R                  U R                  S9U l        U R                  $ N)rR   rF   rG   )r   r@   r   r   r   rQ   rR   s     rS   re   %ChatCompletionStreamManager.__enter__   s=    '')
,! 22**
 }}rW   c                T    U R                   b  U R                   R                  5         g g rY   )r   ri   rj   s       rS   rn   $ChatCompletionStreamManager.__exit__   s#     ==$MM! %rW   __api_request__input_tools__response_format__streamN)r   z)Callable[[], Stream[ChatCompletionChunk]]rF   r   rG   r   r   r   )r   z%ChatCompletionStream[ResponseFormatT]r   )	r   r   r   r   r   rT   re   rn   r   rd   rW   rS   r   r   {   sd    
)>
) P	
)
 B
) 

)	"," "" %	"
 
"rW   r   c                      \ rS rSrSr        SS jrSS jrSS jrSS jr        SS jr	SS jr
SS	 jrSS
 jr\SS j5       rSS jrSrg)AsyncChatCompletionStream   rB   c               x    Xl         UR                  U l        U R                  5       U l        [        X#S9U l        g rD   rH   rP   s       rS   rT   "AsyncChatCompletionStream.__init__   rV   rW   c                R   #    U R                   R                  5       I S h  vN $  N7frY   )rM   	__anext__r[   s    rS   r   #AsyncChatCompletionStream.__anext__   s     ^^--////s   '%'c               J   #    U R                     S h  vN nU7v   M   N
 g 7frY   r^   r_   s     rS   	__aiter__#AsyncChatCompletionStream.__aiter__   s     .. 	$J	.s   #!!#!#c                   #    U $ 7frY   rd   r[   s    rS   
__aenter__$AsyncChatCompletionStream.__aenter__   s
     s   c                @   #    U R                  5       I S h  vN   g  N7frY   rh   rj   s       rS   	__aexit__#AsyncChatCompletionStream.__aexit__   s      jjls   c                T   #    U R                   R                  5       I Sh  vN   g N7frq   )rK   acloser[   s    rS   ri   AsyncChatCompletionStream.close   s      nn##%%%s   (&(c                r   #    U R                  5       I Sh  vN   U R                  R                  5       $  N7f)rt   Nru   r[   s    rS   rw   .AsyncChatCompletionStream.get_final_completion   s/      oo{{//11 	 s   757c                8   #    [        U 5      I Sh  vN   U $  N7f)rz   N)r)   r[   s    rS   rv   $AsyncChatCompletionStream.until_done   s     $T*** 	+s   c                .    U R                   R                  $ rY   r}   r[   s    rS   r~   5AsyncChatCompletionStream.current_completion_snapshot   r   rW   c                  #    U R                     S h  vN n[        U5      (       d  M  U R                  R                  U5      nU H  nU7v   M
     MF   NA
 g 7frY   r   r   s       rS   rL   $AsyncChatCompletionStream.__stream__   sN     #// 	)7	BB![[55i@N' (		/s%   AAAA>AAAr   N)rR   z AsyncStream[ChatCompletionChunk]rF   r   rG   r   r   r   r   )r   z9AsyncIterator[ChatCompletionStreamEvent[ResponseFormatT]]r   r   r   r   r   )r   r   r   r   r   rT   r   r   r   r   ri   rw   rv   r   r~   rL   r   rd   rW   rS   r   r      s    
j 5
j P	
j
 B
j 

j0, " %	
 
&	2
 7 7rW   r   c                  V    \ rS rSrSr        SS jrS	S jr        S
S jrSrg) AsyncChatCompletionStreamManager   a-  Context manager over a `AsyncChatCompletionStream` that is returned by `.stream()`.

This context manager ensures the response cannot be leaked if you don't read
the stream to completion.

Usage:
```py
async with client.chat.completions.stream(...) as stream:
    for event in stream:
        ...
```
c               6    S U l         Xl        X l        X0l        g rY   ))_AsyncChatCompletionStreamManager__stream._AsyncChatCompletionStreamManager__api_request2_AsyncChatCompletionStreamManager__response_format._AsyncChatCompletionStreamManager__input_toolsr   s       rS   rT   )AsyncChatCompletionStreamManager.__init__  s     LP(!0(rW   c                   #    U R                   I S h  vN n[        UU R                  U R                  S9U l        U R                  $  N47fr   )r   r   r   r   r   r   s     rS   r   +AsyncChatCompletionStreamManager.__aenter__  sE     ---
1! 22**
 }} .s   A	A5A	c                p   #    U R                   b#  U R                   R                  5       I S h  vN   g g  N7frY   )r   ri   rj   s       rS   r   *AsyncChatCompletionStreamManager.__aexit__  s/      ==$--%%''' %'s   +646r   N)r   z+Awaitable[AsyncStream[ChatCompletionChunk]]rF   r   rG   r   r   r   )r   z*AsyncChatCompletionStream[ResponseFormatT]r   )	r   r   r   r   r   rT   r   r   r   rd   rW   rS   r   r      sd    
)@
) P	
)
 B
) 

)	(,( "( %	(
 
(rW   r   c                      \ rS rSrSr\\S.     SS jjrSS jr\SS j5       r	SS jr
SS jrSS	 jr      SS
 jrSrg)rN   i%  a#  Helper class for manually accumulating `ChatCompletionChunk`s into a final `ChatCompletion` object.

This is useful in cases where you can't always use the `.stream()` method, e.g.

```py
from openai.lib.streaming.chat import ChatCompletionStreamState

state = ChatCompletionStreamState()

stream = client.chat.completions.create(..., stream=True)
for chunk in response:
    state.handle_chunk(chunk)

    # can also access the accumulated `ChatCompletion` mid-stream
    state.current_completion_snapshot

print(state.get_final_completion())
```
)rG   rF   c                   S U l         / U l        [        U5      (       a  U Vs/ s H  o3PM     snO/ U l        X l        [
        R                  " U5      (       a  X l        g [        U l        g s  snf rY   )	7_ChatCompletionStreamState__current_completion_snapshot/_ChatCompletionStreamState__choice_event_statesr'   _input_tools_response_formatinspectisclassr$   _rich_response_format)rQ   rG   rF   tools       rS   rT   "ChatCompletionStreamState.__init__:  sb     SW*=?">F{>S>Sk:kdTk:Y[ /IPYhIiIio"ox" ;s   A,c                T    [        U R                  U R                  U R                  S9$ )zParse the final completion object.

Note this does not provide any guarantees that the stream has actually finished, you must
only call this method when the stream is finished.
)chat_completionrF   rG   )r1   r~   r   r   r[   s    rS   rw   .ChatCompletionStreamState.get_final_completionG  s,     % << 66))
 	
rW   c                8    U R                   c   eU R                   $ rY   )r   r[   s    rS   r~   5ChatCompletionStreamState.current_completion_snapshotS  s     11===111rW   c                b    U R                  U5      U l        U R                  UU R                  S9$ )zTAccumulate a new chunk into the snapshot and returns an iterable of events to yield.)chunkcompletion_snapshot)_accumulate_chunkr   _build_events)rQ   r   s     rS   r   &ChatCompletionStreamState.handle_chunkX  s9    -1-C-CE-J*!! $ B B " 
 	
rW   c                     U R                   UR                     $ ! [         a3    [        U R                  S9nU R                   R                  U5        Us $ f = f)N)rG   )r   index
IndexErrorChoiceEventStater   append)rQ   choicechoice_states      rS   _get_choice_state+ChatCompletionStreamState._get_choice_statea  sU    	 --fll;; 	 +8I8IJL&&--l;	 s    :AAc                   U R                   nUc  [        U5      $ UR                   GH8  n UR                  UR                     nUR                  R
                  =(       d    / n[        [        [        [        [        [        S[        UR                  [        [        S[        UR                  R
                  =(       d    / 5       VVs0 s H  u  pgUSSS00_M     snnS.5      S95      [        SUR                  R                  5       5      5      S95      Ul        [        U5       H  u  pUR                  R
                  =(       d    / U   n
U	R                  S:X  a9  U
R                  S:X  d   eU	R                   R"                  U
R                   l        Mp  [$        (       d  M}  ['        U	5        M     UR.                  (       ag  UR.                  Ul        [1        U R2                  U R4                  S9(       a3  UR.                  S:X  a	  [7        US9eUR.                  S:X  a
  [9        5       eUR                  R:                  (       a  UR                  R<                  (       dz  [?        U R@                  5      (       a`  UR                  R:                  RC                  5       (       a7  [E        [G        UR                  R:                  S5      SS9UR                  l$        UR                  R
                  =(       d    /  GH  nUR                  R
                  =(       d    / UR                     nUR                  S:X  a  [K        U R4                  UR                   RL                  S9nU(       a~  URO                  S0 5      RO                  S5      (       aV  UR                   RP                  (       a9  [E        [G        UR                   RP                  S5      SS9UR                   l        M  M  M  M  [$        (       d  M  ['        U5        GM
     URR                  c  GM  URR                  c?  [U        [V        URR                  R:                  URR                  R<                  S9Ul)        GM=  URR                  R:                  (       aa  URR                  R:                  c  / URR                  l        URR                  R:                  RY                  URR                  R:                  5        URR                  R<                  (       d  GM  URR                  R<                  c  / URR                  l        URR                  R<                  RY                  URR                  R<                  5        GM;     URZ                  Ul-        UR\                  Ul.        U$ s  snnf ! [(         ah    [        [*        [        [*        0 UR                  SS1S	9ES
UR                  R                  5       0ES95      nUR                  R-                  U5         GNJf = f)Nzdict[object, object]Tfunctionparsed_arguments)parsed
tool_calls)excludetype_valuedeltaexclude_unsetr   messagerE   length)
completioncontent_filterzutf-8)partial_mode)rG   namestrict)contentrefusal)/r   $_convert_initial_chunk_into_snapshotchoicesr   r  r   r   r   r,   r"   r*   r%   	enumerater  to_dicttyper   r   r   r   r   r   r   finish_reasonr/   r   r   r:   r;   r  r  r'   r   lstripr   bytesr   r2   r  get	argumentslogprobsr+   r<   extendusagesystem_fingerprint)rQ   r   r   r   choice_snapshotprevious_tool_callsidx_
tool_index	prev_toolnew_tooltool_call_chunktool_call_snapshot
input_tools                 rS   r   +ChatCompletionStreamState._accumulate_chunki  s   "@@&7>>mmF7D"5"="=fll"K&5&=&=&H&H&NB#*.7"A.  6 *$3$;$; -1(-6: ?HH_H_HjHjHpnp>q;.>qFC 14jCUW[B\5]0]>q;.)*
-&!"( !!79M9M9OP++'@ .77J-K)J / 7 7 B B Hb*UH ~~3'}}
:::=F=O=O=`=`)):&$Y/ .L* ##060D0D-&t7L7LZ^ZkZkl++x7 6ATUU++/??<>>  ''//'//77T7788#++33::<<1:/11997C!%2''.
 $*<<#:#:#@b#@&5&=&=&H&H&NBP_PePe%f"%**j8!7$($5$5<N<W<W<\<\"J
 #&NN:r:>>xHH.77AAGP!"4"="="G"GQ)-H*33D B I # #] !34% $A( *"++3/4& & 7 7 & 7 70O, ..*33;;C?AO44<'0088??@W@WX...*33;;C?AO44<'0088??@W@WXq $t %*KK!161I1I.""O;..  D"&("2$//dWI/V%v||';';'=	# $++22?CDs,   BV	V,CV&VVA.X ?X c                  / nUR                  [        [        SXS95        UR                   GH  nU R	                  U5      nUR                  UR
                     nUR                  R                  bs  UR                  R                  b\  UR                  [        [        SUR                  R                  UR                  R                  UR                  R                  S95        UR                  R                  b^  UR                  R                  bG  UR                  [        [        SUR                  R                  UR                  R                  S95        UR                  R                  (       Ga  UR                  R                  nUc   eUR                  R                   H  nXxR
                     n	U	R                  S:X  a  UR                  c   eUR                  [        [         SU	R                  R"                  UR
                  U	R                  R$                  U	R                  R&                  UR                  R$                  =(       d    S	S
95        M  [(        (       d  M  [+        U	5        M     UR,                  Gb  UR,                  b  UR,                  R                  (       ab  UR,                  R                  (       aG  UR                  [        [.        SUR,                  R                  UR,                  R                  S95        UR,                  R                  (       ab  UR,                  R                  (       aG  UR                  [        [0        SUR,                  R                  UR,                  R                  S95        UR3                  UR5                  UUU R6                  S95        GM     U$ )Nr   )r  r   snapshotzcontent.delta)r  r  r)  r   zrefusal.delta)r  r  r)  r   z#tool_calls.function.arguments.delta )r  r  r   r  r   arguments_deltazlogprobs.content.delta)r  r  r)  zlogprobs.refusal.delta)r  r  r)  )choice_chunkr  rF   )r   r+   r   r  r   r   r  r  r  r   r   r  r   r   r  r   r    r  r  r   r   r   r  r   r   r  get_done_eventsr   )
rQ   r   r   r   r   r   r  r   tool_call_delta	tool_calls
             rS   r   'ChatCompletionStreamState._build_events  s    LN*7%V	
 mmF11&9L199&,,GO||##/O4K4K4S4S4_%%),$ll22!0!8!8!@!@.66== ||##/O4K4K4S4S4_%%),$ll22!0!8!8!@!@	 ||&&&,44??
!---'-||'>'>O *+@+@ AI ~~3.77CCC&--! C%J%.%7%7%<%<&5&;&;*3*<*<*F*F1:1C1C1T1T0?0H0H0R0R0XVX
 '$Y/# (?& */G/G/S??**/G/G/O/O"))5!9$*OO$;$;%4%=%=%E%E	 ??**/G/G/O/O"))5!9$*OO$;$;%4%=%=%E%E	 !!,,!'$3$($9$9 - K $Z rW   )__choice_event_states__current_completion_snapshotr   r   r   N)rG   r   rF   r   r   r   r   r   )r   r7   r   z4Iterable[ChatCompletionStreamEvent[ResponseFormatT]])r   ChoiceChunkr   r   r   r7   r   r   )r   r7   r   r   r   0list[ChatCompletionStreamEvent[ResponseFormatT]])r   r   r   r   r   r$   rT   rw   r   r~   r   r   r   r   r   rd   rW   rS   rN   rN   %  s    . ENR[	y By P	y
 
y

 2 2
 C#JY #Y :	Y
 
:YrW   rN   c                  h    \ rS rSrSS jr        S	S jr      S
S jr        SS jrSrg)r   iJ  c               t    Xl         SU l        SU l        SU l        SU l        [        5       U l        S U l        g )NF)r   _content_done_refusal_done_logprobs_content_done_logprobs_refusal_doneset_done_tool_calls*_ChoiceEventState__current_tool_call_index)rQ   rG   s     rS   rT   ChoiceEventState.__init__K  s:    '""&+#&+#*-%59&rW   c                  / nUR                   (       a`  UR                  U R                  X#S95        U R                  b5  U R                  U R                  ;  a  U R                  UUU R                  S9  UR                  R                  =(       d    /  Ht  nU R                  UR                  :w  aF  UR                  U R                  X#S95        U R                  b  U R                  UUU R                  S9  UR                  U l        Mv     U$ )N)r  rF   )r   r  r!  )	r  r  _content_done_eventsr>  r=  _add_tool_done_eventr  r   r   )rQ   r,  r  rF   r   r/  s         rS   r-   ChoiceEventState.get_done_eventsU  s    LN((!!))/)k
 ..:22$:O:OO))#1$3#== *  &++66<"<I--@%%--o-o 11=--'5(7#'#A#A .  .7__D* = rW   c                  / nUR                   R                  (       a  U R                  (       d  SU l        [        UUR                   S9nXAR                   l        UR                  [        [        S[        [        [        5      [        U5         5      SUR                   R                  US95        UR                   R                  bJ  U R                  (       d9  SU l        UR                  [        [        SUR                   R                  S95        UR                  ba  UR                  R                  bJ  U R                  (       d9  SU l        UR                  [        [         SUR                  R                  S	95        UR                  ba  UR                  R                  bJ  U R"                  (       d9  SU l        UR                  [        [$        S
UR                  R                  S95        U$ )NT)rF   r  z'type[ContentDoneEvent[ResponseFormatT]]zcontent.done)r  r  r   zrefusal.done)r  r  zlogprobs.content.done)r  r  zlogprobs.refusal.done)r  r  r8  r0   r   r   r+   r   r   r   r3   r  r9  r   r  r:  r   r;  r   )rQ   r  rF   r   r   s        rS   rA  %ChoiceEventState._content_done_events~  s    LN""**43E3E!%D( /'//F .4##*!! AS"234KO4\] (+33;;! ""**6t?Q?Q!%D!!&^_E\E\EdEde
 $$0((00<//*.D'!!.5LVeVnVnVvVvw
 $$0((00<//*.D'!!.5LVeVnVnVvVvw rW   c                  X0R                   ;   a  g U R                   R                  U5        UR                  R                  c   eUR                  R                  U   nUR                  S:X  ax  [        U R                  UR                  S9nXTR                  l        UR                  [        [        SUUR                  R                  UR                  R                  US95        g [        (       a  [        U5        g g )Nr   )rG   r   z"tool_calls.function.arguments.done)r  r   r  r  r   )r=  addr  r   r  r4   r   r   r   r   r+   r   r  r  r   r   )rQ   r   r  r!  r%  r   s         rS   rB  %ChoiceEventState._add_tool_done_event  s     ...!!*-&&11===,44??
K""j0< --8J8S8S  <L''8!!6=$+4499099CC%5	 ]+, rW   )__current_tool_call_indexr8  r=  r   r:  r;  r9  N)rG   zlist[ChatCompletionToolParam]r   r   )r,  r3  r  r   rF   r   r   r5  )r  r   rF   r   r   r5  )r   r5  r  r   r!  intr   r   )	r   r   r   r   rT   r-  rA  rB  r   rd   rW   rS   r   r   J  s    :' "' .	'
 P' 
:'R> .> P	>
 
:>@$- I$- .	$-
 $- 
$-rW   r   c           	     $   U R                  5       n[        SUS   5      nU R                   H>  n0 UR                  SS1S9ESUR                  R                  5       0EX#R
                  '   M@     [        [        [        [        SS 0UESS	0ES
95      $ )Nzlist[object]r  Tr  r  r  r  objectzchat.completionr   )r  r   r  r*   r  r   r   r,   )r   datar  r   s       rS   r  r    s    ==?D>4	?3G--!
dWIF!
v||++-!
   $.$d +	

 
rW   c                     U R                   S:H  $ )Nzchat.completion.chunk)rL  )r   s    rS   r   r     s     666rW   r4  )r   r7   r   bool)U
__future__r   r   typesr   typingr   r   r   r   r	   r
   r   r   typing_extensionsr   r   r   jiterr   _typesr   r   r   _eventsr   r   r   r   r   r   r   r   r   r   r   r    _deltasr"   r$   r%   r&   _utilsr'   r(   r)   _compatr*   _modelsr+   r,   _parsingr.   r/   r0   r1   r2   r3   r4   
_streamingr5   r6   
types.chatr7   r8   r9   _exceptionsr:   r;   types.chat.chat_completionr<    types.chat.chat_completion_chunkr=   r3  #types.chat.completion_create_paramsr>   ResponseFormatParamr@   r   r   r   rN   r   r  r   rd   rW   rS   <module>rc     s    "   b b b : :  k k    ' 1 1 N N " -   / ] ] S 9 F YI7?3 IX,"'/": ,"^I 8 IX,(w'? ,(^b 8 bJ	X- X-v.7rW   