
    /j-                    `   % S SK Jr  S SKrS SKrS SKJ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  SSK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"  SSK#J$r$J%r%  SSK&J'r'J(r(J)r)  SSK*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8J9r9J:r:J;r;J<r<J=r=J>r>  SSK?J@r@JArAJBrB  SSKCJDrE  SSKFJGrG  SSKHJIrIJJrJ  / SQrK\R                  (       d  SSKMJNrN  SSKOJPrQJRrR  SSKSJTrT  SSKUJVrVJWrW  SSKX7  SSKYJZrZJ[r[  \E" 5         \\" 5       r]\K H&  r^\^R                  S5      (       a  M   S\]\^   l`        M(     S SKrS SKrcS SKdreSSK?J'r'J(r(  SqfS\gS'   SqhS\gS'   SqiS\gS'   SqjS\gS '   SrkS!\gS"'   \'qlS#\gS$'   \(qmS%\gS&'   SqnS'\gS('   SqoS)\gS*'   SqpS+\gS,'   \cR                  S-   rr\R                  " \r\R                  R                  S.5      5      qvS/\gS0'   \R                  R                  S15      qwS\gS2'   \R                  R                  S35      qxS\gS4'   \R                  R                  S55      qyS\gS6'   SrzS7\gS8'    " S9 S:\5      r{ " S; S<\{\V5      r| " S= S>\-5      r}SGS? jr~SGS@ jrSGSA jrSqSB\gSC'   SHSD jrSISE jrSSFKJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJr  g! \a\b4 a     GM  f = f)J    )annotationsN)override   )types)	NOT_GIVENOmitNoneTypeNotGiven	TransportProxiesTypesomit	not_given)file_from_path)	ClientOpenAIStreamTimeoutr   AsyncClientAsyncOpenAIAsyncStreamRequestOptions)	BaseModel)	__title____version__)APIResponseAsyncAPIResponse)DEFAULT_TIMEOUTDEFAULT_MAX_RETRIESDEFAULT_CONNECTION_LIMITS)APIError
OAuthErrorOpenAIErrorConflictErrorNotFoundErrorAPIStatusErrorRateLimitErrorAPITimeoutErrorBadRequestErrorAPIConnectionErrorAuthenticationErrorInternalServerErrorPermissionDeniedErrorLengthFinishReasonErrorWebSocketQueueFullErrorUnprocessableEntityErrorAPIResponseValidationErrorInvalidWebhookSignatureErrorContentFilterFinishReasonErrorWebSocketConnectionClosedError)DefaultHttpxClientDefaultAioHttpClientDefaultAsyncHttpxClient)setup_logging)HttpxBinaryResponseContent)ReconnectingEventReconnectingOverrides)1r   r   r   r	   r   r   r
   r   r   r   r   r"   r    r%   r'   r)   r0   r(   r*   r!   r,   r$   r#   r/   r&   r+   r-   r2   r1   r   r   r   r   r   r   r   r   r   r   r   r   r   r4   r6   r5   r9   r:   r.   r3   )	resources)azurepydantic_function_tool)VERSION)AzureOpenAIAsyncAzureOpenAI)*)AssistantEventHandlerAsyncAssistantEventHandler__openai)r   r   
str | Noneapi_keyorganizationprojectwebhook_secretzstr | _httpx.URL | Nonebase_urlfloat | Timeout | Nonetimeoutintmax_retries_t.Mapping[str, str] | Nonedefault_headers_t.Mapping[str, object] | Nonedefault_queryz_httpx.Client | Nonehttp_client)rE   r<   OPENAI_API_TYPEz_ApiType | Noneapi_typeOPENAI_API_VERSIONapi_versionAZURE_OPENAI_ENDPOINTazure_endpointAZURE_OPENAI_AD_TOKENazure_ad_tokenz"_azure.AzureADTokenProvider | Noneazure_ad_token_providerc                    ^  \ rS rSr\\SS j5       5       r\R                  SS j5       r\\SS j5       5       r\R                  SS j5       r\\SS j5       5       r	\	R                  SS j5       r	\\SS j5       5       r
\
R                  SS	 j5       r
\\SU 4S
 jj5       5       r\R                  SU 4S jj5       r\\SS j5       5       r\R                  SS j5       r\\SS j5       5       r\R                  SS j5       r\\SS j5       5       r\R                  S S j5       r\\S!S j5       5       r\R                  S"S j5       r\\S#U 4S jj5       5       r\R                  S$S j5       rSrU =r$ )%_ModuleClient   c                    [         $ NrG   selfs    @/app/agent/.venv/lib/python3.13/site-packages/openai/__init__.pyrG   _ModuleClient.api_key   	         c                    Uq g rb   rc   re   values     rf   rG   rg      	     ri   c                    [         $ rb   rH   rd   s    rf   rH   _ModuleClient.organization   s
     ri   c                    Uq g rb   ro   rk   s     rf   rH   rp      s	     ri   c                    [         $ rb   rI   rd   s    rf   rI   _ModuleClient.project   rh   ri   c                    Uq g rb   rs   rk   s     rf   rI   rt      rm   ri   c                    [         $ rb   rJ   rd   s    rf   rJ   _ModuleClient.webhook_secret   s
     ri   c                    Uq g rb   rw   rk   s     rf   rJ   rx      s	     ri   c                Z   > [         b  [        R                  " [         5      $ [        TU ]   $ rb   )rK   _httpxURLsuperre   	__class__s    rf   rK   _ModuleClient.base_url   s%     ::h''wri   c                $   > U[        5       l        g rb   )r}   rK   )re   urlr   s     rf   rK   r      s    ri   c                    [         $ rb   rM   rd   s    rf   rM   _ModuleClient.timeout   rh   ri   c                    Uq g rb   r   rk   s     rf   rM   r      rm   ri   c                    [         $ rb   rO   rd   s    rf   rO   _ModuleClient.max_retries   s
     ri   c                    Uq g rb   r   rk   s     rf   rO   r      	     ri   c                    [         $ rb   rQ   rd   s    rf   _custom_headers_ModuleClient._custom_headers   s
     ri   c                    Uq g rb   r   rk   s     rf   r   r      s	      ri   c                    [         $ rb   rS   rd   s    rf   _custom_query_ModuleClient._custom_query  s
     ri   c                    Uq g rb   r   rk   s     rf   r   r     s	     ri   c                2   > [         =(       d
    [        TU ]  $ rb   )rT   r}   _clientr~   s    rf   r   _ModuleClient._client  s     -ego-ri   c                    Uq g rb   )rT   rk   s     rf   r   r     r   ri    )returnrF   )rl   rF   r   None)r   z
_httpx.URL)r   z_httpx.URL | strr   r   )r   rL   )rl   rL   r   r   )r   rN   )rl   rN   r   r   )r   rP   )rl   rP   r   r   )r   rR   )rl   rR   r   r   )r   _httpx.Client)rl   r   r   r   )__name__
__module____qualname____firstlineno__propertyr   rG   setterrH   rI   rJ   rK   rM   rO   r   r   r   __static_attributes____classcell__r   s   @rf   r_   r_      s       ^^ 
     
    ^^ 
     
      __     ^^ 
     
       
     
 .  . ^^ ri   r_   c                      \ rS rSrSrg)_AzureModuleClienti  r   N)r   r   r   r   r   r   ri   rf   r   r     s    ri   r   c                  ,   ^  \ rS rSrSU 4S jjrSrU =r$ ) _AmbiguousModuleClientUsageErrori  c                $   > [         TU ]  S5        g )NzAmbiguous use of module client; please set `openai.api_type` or the `OPENAI_API_TYPE` environment variable to `openai` or `azure`)r}   __init__r~   s    rf   r   )_AmbiguousModuleClientUsageError.__init__  s     P	
ri   r   r   r   )r   r   r   r   r   r   r   r   s   @rf   r   r     s    
 
ri   r   c                 D    [         R                  R                  S5      S L$ )NOPENAI_API_KEY)_osenvirongetr   ri   rf   _has_openai_credentialsr   #  s    ;;??+,D88ri   c                 b    [         S L=(       d!    [        R                  R                  S5      S L$ )NAZURE_OPENAI_API_KEY)rZ   r   r   r   r   ri   rf   _has_azure_credentialsr   '  s&    %\9O)PX\)\\ri   c                     [         R                  R                  S5      S L=(       d    [        S L=(       d    [        S L$ )Nr[   )r   r   r   r\   r]   r   ri   rf   _has_azure_ad_credentialsr   +  s7    /0< 	/%	/"$.ri   zOpenAI | Noner   c                 J   [         Gc  [        c  [        R                  R	                  S5      q[
        c  [        R                  R	                  S5      q[        c  [        R                  R	                  S5      q[        c  [        5       n [        5       n[        5       nU (       a  U(       d  U(       a
  [        5       e[
        c  [        b+  [        R                  R	                  S5       b
  [        5       eU(       d  U(       a  SqOSq[        S:X  aJ  [        [        [        [        [
        [        [        [         ["        [$        [&        [(        [*        S9q [         $ [-        [        [        [.        [0        [         ["        [$        [&        [(        [*        S9
q [         $ [         $ )	NrY   r[   rW   r   r<   rE   )rX   rZ   rG   r\   r]   rH   rK   rM   rO   rQ   rS   rT   )
rG   rH   rI   rJ   rK   rM   rO   rQ   rS   rT   )r   rZ   r   r   r   r\   rX   rV   r   r   r   r   r]   r   rG   rH   rK   rM   rO   rQ   rS   rT   r_   rI   rJ   )
has_openai	has_azurehas_azure_ads      rf   _load_clientr   6  s<     ! [[__-DEN! [[__-DEN++//*>?K02J.0I46LyL688*.E.QWZWbWbWfWf&XX 788L"#w('--(?)!' /+'G N%)#+'#
 Nri   c                     S q g rb   )r   r   ri   rf   _reset_clientr   y  s	     Gri   )betachataudioevalsfilesimagesmodelsskillsvideosbatchesuploadsrealtimewebhooks	responses
containers
embeddingscompletionsfine_tuningmoderationsconversationsvector_stores)r   bool)r   r   r   )
__future__r   osr   typing_ttyping_extensionsr    r   _typesr   r   r	   r
   r   r   r   r   _utilsr   r   r   r   r   r   r   r   r   r   _modelsr   _versionr   r   	_responser   r   
_constantsr   r   r   _exceptionsr    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   _base_clientr4   r5   r6   _utils._logsr7   _setup_logging_legacy_responser8   types.websocket_reconnectionr9   r:   __all__TYPE_CHECKING_utils._resources_proxyr;   libr<   _azurer=   versionr>   	lib.azurer?   r@   lib._old_apilib.streamingrB   rC   locals__locals__name
startswithr   	TypeErrorAttributeError_tehttpxr{   rG   __annotations__rH   rI   rJ   rK   rM   rO   rQ   rS   rT   Literal_ApiTypecastr   r   rV   rX   rZ   r\   r]   r_   r   r   r   r   r   r   r   _module_clientr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ri   rf   <module>r      sU   #   &  a a a " v v v  , W W W     , \ [ 9 V R2h 
? R ' W 
   8FT""	*2HV'     > j  !
 !$(
! ("1	 1&S &/3, 304- 4$(! (;;()GGHckkoo>O.PQ/ Q++//*>?Z ? [[__-DE
 E [[__-DE
 E>B ; BqF qh 
{ 
9]  @F     Q >* 		s    
J  J-,J-