Ë
    /æjI   ã                  ó^  — d dl mZ d dlmZmZmZmZ d dlmZm	Z	 d dl
Z
ddlmZ ddlmZ ddlmZ erdd	lmZ g d
¢Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ d e«      Z G d!„ d"e«      Z  G d#„ d$e«      Z! G d%„ d&e«      Z" G d'„ d(e«      Z# G d)„ d*e«      Z$ G d+„ d,e«      Z% G d-„ d.e«      Z& G d/„ d0e'«      Z( G d1„ d2«      Z) G d3„ d4e«      Z* G d5„ d6e«      Z+y)7é    )Úannotations)ÚTYPE_CHECKINGÚAnyÚOptionalÚcast)ÚLiteralÚoverrideNé   )Úis_dict)Úconstruct_type)ÚOAuthErrorCode)ÚChatCompletion)ÚBadRequestErrorÚAuthenticationErrorÚ
OAuthErrorÚPermissionDeniedErrorÚNotFoundErrorÚConflictErrorÚUnprocessableEntityErrorÚRateLimitErrorÚInternalServerErrorÚLengthFinishReasonErrorÚContentFilterFinishReasonErrorÚInvalidWebhookSignatureErrorÚSubjectTokenProviderErrorÚWebSocketConnectionClosedErrorÚWebSocketQueueFullErrorc                  ó   — e Zd Zy)ÚOpenAIErrorN©Ú__name__Ú
__module__Ú__qualname__© ó    úU/root/repos/pocs/video-evals/.venv/lib/python3.12/site-packages/openai/_exceptions.pyr   r   "   ó   „ Ør%   r   c                  ó2   ‡ — e Zd ZU ded<   ddœdˆ fd„Zˆ xZS )r   úhttpx2.Response | NoneÚresponseN)r*   c               ó2   •— t         ‰| �  |«       || _        y ©N)ÚsuperÚ__init__r*   )ÚselfÚmessager*   Ú	__class__s      €r&   r.   z"SubjectTokenProviderError.__init__)   s   ø€ Ü‰Ñ˜Ô!Ø ˆ�r%   )r0   Ústrr*   r)   ÚreturnÚNone©r!   r"   r#   Ú__annotations__r.   Ú__classcell__©r1   s   @r&   r   r   &   s   ø… Ø$Ó$àKO÷ !ó !r%   r   c                  óh   ‡ — e Zd ZU ded<   ded<   ded<   	 dZded	<   dZded
<   ded<   dˆ fd„Zˆ xZS )ÚAPIErrorr2   r0   úhttpx2.RequestÚrequestúobject | NoneÚbodyNzOptional[str]ÚcodeÚparamÚtypec          	     ó´  •— t         ‰| �  |«       || _        || _        || _        t        |«      r“|j                  d«      }|�t        |«      nd | _        t        t        t        t        t           |j                  d«      ¬«      «      | _        t        t        t        t        |j                  d«      ¬«      «      | _        y d | _        d | _        d | _        y )Nr?   r@   )Útype_ÚvaluerA   )r-   r.   r<   r0   r>   r   Úgetr2   r?   r   r   r   r   r@   rA   )r/   r0   r<   r>   r?   r1   s        €r&   r.   zAPIError.__init__A   s¢   ø€ Ü‰Ñ˜Ô!ØˆŒØˆŒØˆŒ	ä�4Œ=Ø—8‘8˜FÓ#ˆDØ%)Ð%5œ˜Dœ	¸4ˆDŒIÜœc¤>¼Ä¹ÈTÏXÉXÐV]ÓM^Ô#_Ó`ˆDŒJÜœS¤.´sÀ$Ç(Á(È6ÓBRÔ"SÓTˆD�IàˆDŒIØˆDŒJØˆD�Ir%   )r0   r2   r<   r;   r>   r=   r3   r4   )r!   r"   r#   r6   r?   r@   r.   r7   r8   s   @r&   r:   r:   .   s?   ø… ØƒLØÓà
Óðð €Dˆ-ÓØ€Eˆ=ÓØ
Ó÷ñ r%   r:   c                  ó<   ‡ — e Zd ZU ded<   ded<   ddœdˆ fd„Zˆ xZS )	ÚAPIResponseValidationErrorúhttpx2.Responser*   ÚintÚstatus_codeN©r0   c               óv   •— t         ‰| �  |xs d|j                  |¬«       || _        |j                  | _        y )Nz1Data returned by API invalid for expected schema.©r>   )r-   r.   r<   r*   rJ   )r/   r*   r>   r0   r1   s       €r&   r.   z#APIResponseValidationError.__init__V   s:   ø€ Ü‰Ñ˜ÒWÐ$WÐYa×YiÑYiÐptÐÔuØ ˆŒØ#×/Ñ/ˆÕr%   )r*   rH   r>   r=   r0   ú
str | Noner3   r4   r5   r8   s   @r&   rG   rG   R   s   ø… ØÓØÓà`d÷ 0ó 0r%   rG   c                  óD   ‡ — e Zd ZU dZded<   ded<   ded<   d	ˆ fd„Zˆ xZS )
ÚAPIStatusErrorz<Raised when an API response has a status code of 4xx or 5xx.rH   r*   rI   rJ   rN   Ú
request_idc               ó®   •— t         ‰| �  ||j                  |¬«       || _        |j                  | _        |j
                  j                  d«      | _        y )NrM   zx-request-id)r-   r.   r<   r*   rJ   ÚheadersrE   rQ   )r/   r0   r*   r>   r1   s       €r&   r.   zAPIStatusError.__init__c   sJ   ø€ Ü‰Ñ˜ (×"2Ñ"2¸ÐÔ>Ø ˆŒØ#×/Ñ/ˆÔØ"×*Ñ*×.Ñ.¨~Ó>ˆ�r%   )r0   r2   r*   rH   r>   r=   r3   r4   )r!   r"   r#   Ú__doc__r6   r.   r7   r8   s   @r&   rP   rP   \   s"   ø… ÙFàÓØÓØÓ÷?ñ ?r%   rP   c                  ó&   ‡ — e Zd Zddœdˆ fd„Zˆ xZS )ÚAPIConnectionErrorzConnection error.rK   c               ó*   •— t         ‰| �  ||d ¬«       y )NrM   ©r-   r.   )r/   r0   r<   r1   s      €r&   r.   zAPIConnectionError.__init__k   s   ø€ Ü‰Ñ˜ '°ÐÕ5r%   )r0   r2   r<   r;   r3   r4   ©r!   r"   r#   r.   r7   r8   s   @r&   rV   rV   j   s   ø„ Ø)<÷ 6ó 6r%   rV   c                  ó    ‡ — e Zd Zdˆ fd„Zˆ xZS )ÚAPITimeoutErrorc                ó(   •— t         ‰| �  d|¬«       y )NzRequest timed out.)r0   r<   rX   )r/   r<   r1   s     €r&   r.   zAPITimeoutError.__init__p   s   ø€ Ü‰ÑÐ!5¸wÐÕGr%   )r<   r;   r3   r4   rY   r8   s   @r&   r[   r[   o   s   ø„ ÷Hñ Hr%   r[   c                  ó   — e Zd ZU dZded<   y)r   i�  zLiteral[400]rJ   N©r!   r"   r#   rJ   r6   r$   r%   r&   r   r   t   ó   … Ø #€K�Ô#r%   r   c                  ó   — e Zd ZU dZded<   y)r   i‘  zLiteral[401]rJ   Nr^   r$   r%   r&   r   r   x   r_   r%   r   c                  ó,   ‡ — e Zd ZU ded<   dˆ fd„Zˆ xZS )r   zOptional[OAuthErrorCode]Úerrorc               óì   •— d}d }t        |«      r6|j                  d«      }|j                  d«      }|rt        |t        «      r|}t        ‰| �  |||¬«       t        t        t           |«      | _	        y )NzOAuth authentication error.rb   Úerror_description)r*   r>   )
r   rE   Ú
isinstancer2   r-   r.   r   r   r   rb   )r/   r*   r>   r0   rb   Údescriptionr1   s         €r&   r.   zOAuthError.__init__   si   ø€ Ø/ˆØˆä�4Œ=Ø—H‘H˜WÓ%ˆEØŸ(™(Ð#6Ó7ˆKÙœz¨+´sÔ;Ø%�ä‰Ñ˜¨8¸$ÐÔ?Üœ(¤>Ñ2°EÓ:ˆ�
r%   )r*   rH   r>   r=   r3   r4   r5   r8   s   @r&   r   r   |   s   ø… Ø#Ó#÷;ñ ;r%   r   c                  ó   — e Zd ZU dZded<   y)r   i“  zLiteral[403]rJ   Nr^   r$   r%   r&   r   r   �   r_   r%   r   c                  ó   — e Zd ZU dZded<   y)r   i”  zLiteral[404]rJ   Nr^   r$   r%   r&   r   r   ‘   r_   r%   r   c                  ó   — e Zd ZU dZded<   y)r   i™  zLiteral[409]rJ   Nr^   r$   r%   r&   r   r   •   r_   r%   r   c                  ó   — e Zd ZU dZded<   y)r   i¦  zLiteral[422]rJ   Nr^   r$   r%   r&   r   r   ™   r_   r%   r   c                  ó   — e Zd ZU dZded<   y)r   i­  zLiteral[429]rJ   Nr^   r$   r%   r&   r   r   �   r_   r%   r   c                  ó   — e Zd Zy)r   Nr    r$   r%   r&   r   r   ¡   r'   r%   r   c                  ó.   ‡ — e Zd ZU ded<   	 dˆ fd„Zˆ xZS )r   r   Ú
completionc               ór   •— d}|j                   r|d|j                   › �z  }t        ‰| �	  |«       || _        y )Nz@Could not parse response content as the length limit was reachedz - )Úusager-   r.   rn   )r/   rn   Úmsgr1   s      €r&   r.   z LengthFinishReasonError.__init__­   s=   ø€ ØPˆØ×ÒØ�S˜×)Ñ)Ð*Ð+Ñ+ˆCä‰Ñ˜ÔØ$ˆ�r%   )rn   r   r3   r4   r5   r8   s   @r&   r   r   ¥   s   ø… ØÓð÷%ñ %r%   r   c                  ó4   ‡ — e Zd ZU ded<   	 ddœdˆ fd„Zˆ xZS )r   úChatCompletion | Nonern   N)rn   c               ó2   •— t         ‰| �  d«       || _        y )NzRCould not parse response content as the request was rejected by the content filter)r-   r.   rn   )r/   rn   r1   s     €r&   r.   z'ContentFilterFinishReasonError.__init__½   s   ø€ Ü‰ÑØ`ô	
ð %ˆ�r%   )rn   rs   r3   r4   r5   r8   s   @r&   r   r   ¶   s   ø… Ø%Ó%ðð
 ?C÷ %ó %r%   r   c                  ó   — e Zd ZdZy)r   zqRaised when a webhook signature is invalid, meaning the computed signature does not match the expected signature.N©r!   r"   r#   rT   r$   r%   r&   r   r   Ä   s   „ Ú{r%   r   c                  ó*   — e Zd ZdZdd„Zedd„«       Zy)Ú_WebSocketRecoveryData©ÚframesÚmessagesc                ó    — || _         || _        y r,   ry   )r/   rz   r{   s      r&   r.   z_WebSocketRecoveryData.__init__Ë   s   € ØˆŒØ ˆ�r%   c                 ó   — y)Nz"<redacted WebSocket recovery data>r$   ©r/   s    r&   Ú__repr__z_WebSocketRecoveryData.__repr__Ï   s   € à3r%   N)rz   úlist[str] | list[str | bytes]r{   ú	list[str]r3   r4   )r3   r2   )r!   r"   r#   Ú	__slots__r.   r	   r   r$   r%   r&   rx   rx   È   s    „ Ø&€Ió!ð ò4ó ñ4r%   rx   c                  ó”   ‡ — e Zd ZdZdˆ fd„Zedd„«       Zej                  d	d„«       Zed
d„«       Zej                  dd„«       Zˆ xZ	S )r   a  Raised when a WebSocket connection closes with unsent messages.

    `unsent_frames` preserves the text and binary frames in their original order.
    `unsent_messages` retains the text messages, including UTF-8 binary frames
    represented as text for compatibility.
    c               ó:  •— t         ‰| �  |«       t        d„ |D «       «      rt        d|«      }nLg }|D ]E  }t	        |t
        «      r|j                  |«       Œ%	 |j                  |j                  d«      «       ŒG t        ||«      | _
        y # t        $ r Y Œew xY w)Nc              3  ó<   K  — | ]  }t        |t        «      –— Œ y ­wr,   )re   r2   )Ú.0Údatas     r&   ú	<genexpr>z:WebSocketConnectionClosedError.__init__.<locals>.<genexpr>ß   s   è ø€ ÒA¨Œz˜$¤×$ÑAùs   ‚r�   zutf-8)r-   r.   Úallr   re   r2   ÚappendÚdecodeÚUnicodeDecodeErrorrx   Ú	_recovery)r/   r0   Úunsent_messagesr{   r‡   r1   s        €r&   r.   z'WebSocketConnectionClosedError.__init__Ü   s’   ø€ Ü‰Ñ˜Ô!äÑA°ÔAÔAÜ˜K¨Ó9‰HàˆHØ'ò �Ü˜d¤CÔ(Ø—O‘O DÕ)ðØ Ÿ™¨¯©°GÓ(<Õ=ðô 0°ÀÓJˆ�øô .ò áðús   Á BÂ	BÂBc                ó.   — | j                   j                  S r,   )r�   r{   r~   s    r&   rŽ   z.WebSocketConnectionClosedError.unsent_messagesð   s   € à�~‰~×&Ñ&Ð&r%   c                ób   — t        | d«      r|| j                  _        y t        g |«      | _        y )Nr�   )Úhasattrr�   r{   rx   )r/   r{   s     r&   rŽ   z.WebSocketConnectionClosedError.unsent_messagesô   s(   € ä�4˜Ô%Ø&.ˆD�N‰NÕ#ô 4°B¸ÓAˆD�Nr%   c                ó.   — | j                   j                  S r,   ©r�   rz   r~   s    r&   Úunsent_framesz,WebSocketConnectionClosedError.unsent_framesü   s   € à�~‰~×$Ñ$Ð$r%   c                ó&   — || j                   _        y r,   r“   )r/   rz   s     r&   r”   z,WebSocketConnectionClosedError.unsent_frames   s   € à &ˆ�‰Õr%   )r0   r2   rŽ   r€   r3   r4   )r3   r�   )r{   r�   r3   r4   )r3   r€   )rz   r€   r3   r4   )
r!   r"   r#   rT   r.   ÚpropertyrŽ   Úsetterr”   r7   r8   s   @r&   r   r   Ô   sl   ø„ ñõKð( ò'ó ð'ð ×ÑòBó ðBð ò%ó ð%ð ×Ñò'ó ô'r%   r   c                  ó   — e Zd ZdZy)r   zMRaised when the outgoing WebSocket message queue exceeds its byte-size limit.Nrv   r$   r%   r&   r   r     s   „ ÙWàr%   r   ),Ú
__future__r   Útypingr   r   r   r   Útyping_extensionsr   r	   Úhttpx2Ú_utilsr   Ú_modelsr   Útypes.shared.oauth_error_coder   Ú
types.chatr   Ú__all__Ú	Exceptionr   r   r:   rG   rP   rV   r[   r   r   r   r   r   r   r   r   r   r   r   Ú
ValueErrorr   rx   r   r   r$   r%   r&   ú<module>r¤      s8  ðÝ "ç 5Ó 5ß /ã å Ý #Ý 9áÝ*ò€ô&	�)ô 	ô! ô !ô!ˆ{ô !ôH0 ô 0ô?�Xô ?ô6˜ô 6ô
HÐ(ô Hô
$�nô $ô$˜.ô $ô;Ð$ô ;ô"$˜Nô $ô$�Nô $ô$�Nô $ô$˜~ô $ô$�^ô $ô	˜.ô 	ô%˜kô %ô"% [ô %ô| :ô |÷	4ñ 	4ô.' [ô .'ôb	˜kõ 	r%   