Ë
    ²Œj�  ã                  óâ  — d dl mZ d dlmZmZmZmZ d dlmZ d dl	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#y),é    )Úannotations)ÚTYPE_CHECKINGÚAnyÚOptionalÚcast)ÚLiteralNé   )Úis_dict)Úconstruct_type)ÚChatCompletion)ÚBadRequestErrorÚAuthenticationErrorÚPermissionDeniedErrorÚNotFoundErrorÚConflictErrorÚUnprocessableEntityErrorÚRateLimitErrorÚInternalServerErrorÚLengthFinishReasonErrorÚContentFilterFinishReasonErrorÚInvalidWebhookSignatureErrorc                  ó   — e Zd Zy)ÚOpenAIErrorN©Ú__name__Ú
__module__Ú__qualname__© ó    ú\/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/openai/_exceptions.pyr   r      ó   „ Ø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 )ÚAPIErrorÚstrÚmessageúhttpx.RequestÚrequestúobject | NoneÚbodyNzOptional[str]ÚcodeÚparamÚtypec          	     óÞ  •— t         ‰| �  |«       || _        || _        || _        t        |«      r¨t        t        t        t        t           |j                  d«      ¬«      «      | _        t        t        t        t        t           |j                  d«      ¬«      «      | _        t        t        t        t        |j                  d«      ¬«      «      | _        y d | _        d | _        d | _        y )Nr*   )Útype_Úvaluer+   r,   )ÚsuperÚ__init__r'   r%   r)   r
   r   r   r   r   r$   Úgetr*   r+   r,   )Úselfr%   r'   r)   Ú	__class__s       €r    r1   zAPIError.__init__6   s¥   ø€ Ü‰Ñ˜Ô!ØˆŒØˆŒØˆŒ	ä�4Œ=ÜœS¤.´xÄ±}ÈDÏHÉHÐU[ÓL\Ô"]Ó^ˆDŒIÜœc¤>¼Ä¹ÈTÏXÉXÐV]ÓM^Ô#_Ó`ˆDŒJÜœS¤.´sÀ$Ç(Á(È6ÓBRÔ"SÓTˆD�IàˆDŒIØˆDŒJØˆD�Ir   )r%   r$   r'   r&   r)   r(   ÚreturnÚNone)r   r   r   Ú__annotations__r*   r+   r1   Ú__classcell__©r4   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úhttpx.ResponseÚresponseÚintÚstatus_codeN©r%   c               óv   •— t         ‰| �  |xs d|j                  |¬«       || _        |j                  | _        y )Nz1Data returned by API invalid for expected schema.©r)   )r0   r1   r'   r=   r?   )r3   r=   r)   r%   r4   s       €r    r1   z#APIResponseValidationError.__init__J   s:   ø€ Ü‰Ñ˜ÒWÐ$WÐYa×YiÑYiÐptÐÔuØ ˆŒØ#×/Ñ/ˆÕr   )r=   r<   r)   r(   r%   ú
str | Noner5   r6   ©r   r   r   r7   r1   r8   r9   s   @r    r;   r;   F   s   ø… ØÓØÓà_c÷ 0ó 0r   r;   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.r<   r=   r>   r?   rC   Ú
request_idc               ó®   •— t         ‰| �  ||j                  |¬«       || _        |j                  | _        |j
                  j                  d«      | _        y )NrB   zx-request-id)r0   r1   r'   r=   r?   Úheadersr2   rG   )r3   r%   r=   r)   r4   s       €r    r1   zAPIStatusError.__init__W   sJ   ø€ Ü‰Ñ˜ (×"2Ñ"2¸ÐÔ>Ø ˆŒØ#×/Ñ/ˆÔØ"×*Ñ*×.Ñ.¨~Ó>ˆ�r   )r%   r$   r=   r<   r)   r(   r5   r6   )r   r   r   Ú__doc__r7   r1   r8   r9   s   @r    rF   rF   P   s"   ø… ÙFàÓØÓØÓ÷?ñ ?r   rF   c                  ó&   ‡ — e Zd Zddœdˆ fd„Zˆ xZS )ÚAPIConnectionErrorzConnection error.r@   c               ó*   •— t         ‰| �  ||d ¬«       y )NrB   ©r0   r1   )r3   r%   r'   r4   s      €r    r1   zAPIConnectionError.__init___   s   ø€ Ü‰Ñ˜ '°ÐÕ5r   )r%   r$   r'   r&   r5   r6   ©r   r   r   r1   r8   r9   s   @r    rL   rL   ^   s   ø„ Ø)<÷ 6ó 6r   rL   c                  ó    ‡ — e Zd Zdˆ fd„Zˆ xZS )ÚAPITimeoutErrorc                ó(   •— t         ‰| �  d|¬«       y )NzRequest timed out.)r%   r'   rN   )r3   r'   r4   s     €r    r1   zAPITimeoutError.__init__d   s   ø€ Ü‰ÑÐ!5¸wÐÕGr   )r'   r&   r5   r6   rO   r9   s   @r    rQ   rQ   c   s   ø„ ÷Hñ Hr   rQ   c                  ó   — e Zd ZU dZded<   y)r   i�  zLiteral[400]r?   N©r   r   r   r?   r7   r   r   r    r   r   h   ó   … Ø #€K�Ô#r   r   c                  ó   — e Zd ZU dZded<   y)r   i‘  zLiteral[401]r?   NrT   r   r   r    r   r   l   rU   r   r   c                  ó   — e Zd ZU dZded<   y)r   i“  zLiteral[403]r?   NrT   r   r   r    r   r   p   rU   r   r   c                  ó   — e Zd ZU dZded<   y)r   i”  zLiteral[404]r?   NrT   r   r   r    r   r   t   rU   r   r   c                  ó   — e Zd ZU dZded<   y)r   i™  zLiteral[409]r?   NrT   r   r   r    r   r   x   rU   r   r   c                  ó   — e Zd ZU dZded<   y)r   i¦  zLiteral[422]r?   NrT   r   r   r    r   r   |   rU   r   r   c                  ó   — e Zd ZU dZded<   y)r   i­  zLiteral[429]r?   NrT   r   r   r    r   r   €   rU   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 - )Úusager0   r1   r^   )r3   r^   Úmsgr4   s      €r    r1   z LengthFinishReasonError.__init__�   s=   ø€ ØPˆØ×ÒØ�S˜×)Ñ)Ð*Ð+Ñ+ˆCä‰Ñ˜ÔØ$ˆ�r   )r^   r   r5   r6   rD   r9   s   @r    r   r   ˆ   s   ø… ØÓð÷%ñ %r   r   c                  ó    ‡ — e Zd Zdˆ fd„Zˆ xZS )r   c                ó$   •— t         ‰| �  d«       y )NzRCould not parse response content as the request was rejected by the content filterrN   )r3   r4   s    €r    r1   z'ContentFilterFinishReasonError.__init__š   s   ø€ Ü‰ÑØ`õ	
r   )r5   r6   rO   r9   s   @r    r   r   ™   s   ø„ ÷
ñ 
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   rJ   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;   rF   rL   rQ   r   r   r   r   r   r   r   r   r   r   Ú
ValueErrorr   r   r   r    Ú<module>ro      sû   ðõ #ç 5Ó 5Ý %ã å Ý #áÝ*ò€ô	�)ô 	ô ˆ{ô  ôF0 ô 0ô?�Xô ?ô6˜ô 6ô
HÐ(ô Hô
$�nô $ô$˜.ô $ô$˜Nô $ô$�Nô $ô$�Nô $ô$˜~ô $ô$�^ô $ô	˜.ô 	ô%˜kô %ô"
 [ô 
ô| :õ |r   