Ë
    Ûªgì  ã                  óŠ   — d dl mZ d dlZ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y)é    )ÚannotationsN)Ú
ModelRetryÚ	UserErrorÚAgentRunErrorÚUnexpectedModelBehaviorÚUsageLimitExceededc                  ó2   ‡ — e Zd ZU dZded<   	 dˆ fd„Zˆ xZS )r   z¤Exception raised when a tool function should be retried.

    The agent will return the message to the model and ask it to try calling the function/tool again.
    ÚstrÚmessagec                ó2   •— || _         t        ‰| 	  |«       y ©N©r   ÚsuperÚ__init__©Úselfr   Ú	__class__s     €úK/var/www/openai/venv/lib/python3.12/site-packages/pydantic_ai/exceptions.pyr   zModelRetry.__init__   ó   ø€ ØˆŒÜ‰Ñ˜Õ!ó    ©r   r
   ©Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__r   Ú__classcell__©r   s   @r   r   r      s   ø… ñð
 ƒLØ-÷"ñ "r   r   c                  ó2   ‡ — e Zd ZU dZded<   	 dˆ fd„Zˆ xZS )r   uE   Error caused by a usage mistake by the application developer â€” You!r
   r   c                ó2   •— || _         t        ‰| 	  |«       y r   r   r   s     €r   r   zUserError.__init__   r   r   r   r   r   s   @r   r   r      s   ø… ÙOàƒLØ%÷"ñ "r   r   c                  ó:   ‡ — e Zd ZU dZded<   	 dˆ fd„Zdd„Zˆ xZS )r   z4Base class for errors occurring during an agent run.r
   r   c                ó2   •— || _         t        ‰| 	  |«       y r   r   r   s     €r   r   zAgentRunError.__init__'   r   r   c                ó   — | j                   S r   )r   ©r   s    r   Ú__str__zAgentRunError.__str__+   s   € Ø|‰|Ðr   r   ©Úreturnr
   ©r   r   r   r   r   r   r&   r   r   s   @r   r   r   !   s   ø… Ù>àƒLØõ"÷r   r   c                  ó   — e Zd ZdZy)r   z?Error raised when a Model's usage exceeds the specified limits.N)r   r   r   r   © r   r   r   r   /   s   „ ÚIr   r   c                  óH   ‡ — e Zd ZU dZded<   	 ded<   	 dd	ˆ fd„Zd
d„Zˆ xZS )r   zLError caused by unexpected Model behavior, e.g. an unexpected response code.r
   r   ú
str | NoneÚbodyc                óÒ   •— || _         |€d | _        n0	 t        j                  t        j                  |«      d¬«      | _        t        ‰|   |«       y # t
        $ r
 || _        Y Œ"w xY w)Né   )Úindent)r   r.   ÚjsonÚdumpsÚloadsÚ
ValueErrorr   r   )r   r   r.   r   s      €r   r   z UnexpectedModelBehavior.__init__;   s]   ø€ ØˆŒØˆ<Ø$(ˆDIð!Ü ŸJ™J¤t§z¡z°$Ó'7ÀÔB”	ô 	‰Ñ˜Õ!øô ò !Ø –	ð!ús   ”/A ÁA&Á%A&c                óh   — | j                   r| j                  › d| j                   › S | j                  S )Nz, body:
)r.   r   r%   s    r   r&   zUnexpectedModelBehavior.__str__F   s,   € Ø9Š9Ø—l‘l^ 9¨T¯Y©Y¨KÐ8Ð8à—<‘<Ðr   r   )r   r
   r.   r-   r'   r)   r   s   @r   r   r   3   s!   ø… ÙVàƒLØ1Ø
ÓØ1ö	"÷ r   r   )Ú
__future__r   Ú_annotationsr2   Ú__all__Ú	Exceptionr   ÚRuntimeErrorr   r   r   r   r+   r   r   Ú<module>r<      sN   ðÝ 2ã à
e€ô"ô "ô"ô "ôLô ôJ˜ô Jô ˜mõ  r   