
    2h                       S SK Jr  S SKJrJrJrJr  S SKJr  S SK	r	SSK
Jr  SSKJr  \(       a  SSKJr  / S	Qr " S
 S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S  S!\5      r " S" S#\5      r " S$ S%\5      r " S& S'\5      r  " S( S)\5      r! " S* S+\"5      r#g),    )annotations)TYPE_CHECKINGAnyOptionalcast)LiteralN   )is_dict)construct_type)ChatCompletion)BadRequestErrorAuthenticationErrorPermissionDeniedErrorNotFoundErrorConflictErrorUnprocessableEntityErrorRateLimitErrorInternalServerErrorLengthFinishReasonErrorContentFilterFinishReasonErrorInvalidWebhookSignatureErrorc                      \ rS rSrSrg)OpenAIError    N__name__
__module____qualname____firstlineno____static_attributes__r       J/var/www/auris/envauris/lib/python3.13/site-packages/openai/_exceptions.pyr   r          r"   r   c                  t   ^  \ rS rSr% S\S'   S\S'   S\S'    SrS	\S
'   SrS	\S'   S	\S'   SU 4S jjrSrU =r	$ )APIError#   strmessagehttpx.Requestrequestobject | NonebodyNzOptional[str]codeparamtypec          	       > [         TU ]  U5        X l        Xl        X0l        [        U5      (       a  [        [        [        [        [           UR                  S5      S95      U l        [        [        [        [        [           UR                  S5      S95      U l        [        [        [        [        UR                  S5      S95      U l        g S U l        S U l        S U l        g )Nr.   )type_valuer/   r0   )super__init__r+   r)   r-   r
   r   r   r   r   r(   getr.   r/   r0   )selfr)   r+   r-   	__class__s       r#   r5   APIError.__init__6   s    !	4==S.x}DHHU[L\"]^DIc>TXXV]M^#_`DJS.s$((6BR"STDIDIDJDIr"   )r-   r.   r)   r/   r+   r0   )r)   r(   r+   r*   r-   r,   returnNone)
r   r   r   r    __annotations__r.   r/   r5   r!   __classcell__r8   s   @r#   r&   r&   #   s?    L
 D-E=
 r"   r&   c                  J   ^  \ rS rSr% S\S'   S\S'   SS.S
U 4S jjjrS	rU =r$ )APIResponseValidationErrorF   httpx.Responseresponseintstatus_codeNr)   c               x   > [         TU ]  U=(       d    SUR                  US9  Xl        UR                  U l        g )Nz1Data returned by API invalid for expected schema.r-   )r4   r5   r+   rC   rE   )r7   rC   r-   r)   r8   s       r#   r5   #APIResponseValidationError.__init__J   s8    W$WYaYiYiptu #//r"   )rC   rE   )rC   rB   r-   r,   r)   
str | Noner:   r;   r   r   r   r    r<   r5   r!   r=   r>   s   @r#   r@   r@   F   s!    _c 0 0 0r"   r@   c                  P   ^  \ rS rSr% SrS\S'   S\S'   S\S'   SU 4S	 jjrS
rU =r$ )APIStatusErrorP   z<Raised when an API response has a status code of 4xx or 5xx.rB   rC   rD   rE   rJ   
request_idc                  > [         TU ]  XR                  US9  X l        UR                  U l        UR
                  R                  S5      U l        g )NrH   zx-request-id)r4   r5   r+   rC   rE   headersr6   rO   )r7   r)   rC   r-   r8   s       r#   r5   APIStatusError.__init__W   sF    "2"2> #//"**..~>r"   )rO   rC   rE   )r)   r(   rC   rB   r-   r,   r:   r;   )	r   r   r   r    __doc__r<   r5   r!   r=   r>   s   @r#   rM   rM   P   s"    F? ?r"   rM   c                  4   ^  \ rS rSrSS.SU 4S jjjrSrU =r$ )APIConnectionError^   zConnection error.rF   c               "   > [         TU ]  XS S9  g )NrH   r4   r5   )r7   r)   r+   r8   s      r#   r5   APIConnectionError.__init___   s    5r"   r   )r)   r(   r+   r*   r:   r;   r   r   r   r    r5   r!   r=   r>   s   @r#   rU   rU   ^   s    )< 6 6 6r"   rU   c                  ,   ^  \ rS rSrSU 4S jjrSrU =r$ )APITimeoutErrorc   c                "   > [         TU ]  SUS9  g )NzRequest timed out.)r)   r+   rX   )r7   r+   r8   s     r#   r5   APITimeoutError.__init__d   s    !5wGr"   r   )r+   r*   r:   r;   rZ   r>   s   @r#   r\   r\   c   s    H Hr"   r\   c                  $    \ rS rSr% SrS\S'   Srg)r   h   i  zLiteral[400]rE   r   Nr   r   r   r    rE   r<   r!   r   r"   r#   r   r   h        #K#r"   r   c                  $    \ rS rSr% SrS\S'   Srg)r   l   i  zLiteral[401]rE   r   Nrb   r   r"   r#   r   r   l   rc   r"   r   c                  $    \ rS rSr% SrS\S'   Srg)r   p   i  zLiteral[403]rE   r   Nrb   r   r"   r#   r   r   p   rc   r"   r   c                  $    \ rS rSr% SrS\S'   Srg)r   t   i  zLiteral[404]rE   r   Nrb   r   r"   r#   r   r   t   rc   r"   r   c                  $    \ rS rSr% SrS\S'   Srg)r   x   i  zLiteral[409]rE   r   Nrb   r   r"   r#   r   r   x   rc   r"   r   c                  $    \ rS rSr% SrS\S'   Srg)r   |   i  zLiteral[422]rE   r   Nrb   r   r"   r#   r   r   |   rc   r"   r   c                  $    \ rS rSr% SrS\S'   Srg)r      i  zLiteral[429]rE   r   Nrb   r   r"   r#   r   r      rc   r"   r   c                      \ rS rSrSrg)r      r   Nr   r   r"   r#   r   r      r$   r"   r   c                  :   ^  \ rS rSr% S\S'    SU 4S jjrSrU =r$ )r      r   
completionc               z   > SnUR                   (       a  USUR                    3-  n[        TU ]	  U5        Xl        g )Nz@Could not parse response content as the length limit was reachedz - )usager4   r5   rt   )r7   rt   msgr8   s      r#   r5    LengthFinishReasonError.__init__   s;    PS))*++C$r"   )rt   )rt   r   r:   r;   rK   r>   s   @r#   r   r      s    % %r"   r   c                  ,   ^  \ rS rSrSU 4S jjrSrU =r$ )r      c                $   > [         TU ]  S5        g )NzRCould not parse response content as the request was rejected by the content filterrX   )r7   r8   s    r#   r5   'ContentFilterFinishReasonError.__init__   s    `	
r"   r   )r:   r;   rZ   r>   s   @r#   r   r      s    
 
r"   r   c                      \ rS rSrSrSrg)r      zqRaised when a webhook signature is invalid, meaning the computed signature does not match the expected signature.r   N)r   r   r   r    rS   r!   r   r"   r#   r   r      s    {r"   r   )$
__future__r   typingr   r   r   r   typing_extensionsr   httpx_utilsr
   _modelsr   
types.chatr   __all__	Exceptionr   r&   r@   rM   rU   r\   r   r   r   r   r   r   r   r   r   r   
ValueErrorr   r   r"   r#   <module>r      s    # 5 5 %   #*	) 	 {  F0 0?X ?6 6
H( H
$n $$. $$N $$N $$N $$~ $$^ $	. 	%k %"
[ 
|: |r"   