
    .h@                         d dl mZ erddlmZm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dS )    )TYPE_CHECKING   )InputGuardrailResultOutputGuardrailResultc                       e Zd ZdZdS )AgentsExceptionz0Base class for all exceptions in the Agents SDK.N)__name__
__module____qualname____doc__     N/var/www/FlaskApp/flask-venv/lib/python3.11/site-packages/agents/exceptions.pyr   r      s        ::::r   r   c                   *    e Zd ZU dZeed<   defdZdS )MaxTurnsExceededz>Exception raised when the maximum number of turns is exceeded.messagec                     || _         d S Nr   selfr   s     r   __init__zMaxTurnsExceeded.__init__       r   Nr	   r
   r   r   str__annotations__r   r   r   r   r   r      s@         HHLLL      r   r   c                   *    e Zd ZU dZeed<   defdZdS )ModelBehaviorErrorzException raised when the model does something unexpected, e.g. calling a tool that doesn't
    exist, or providing malformed JSON.
    r   c                     || _         d S r   r   r   s     r   r   zModelBehaviorError.__init__   r   r   Nr   r   r   r   r   r      sF           LLL      r   r   c                   *    e Zd ZU dZeed<   defdZdS )	UserErrorz<Exception raised when the user makes an error using the SDK.r   c                     || _         d S r   r   r   s     r   r   zUserError.__init__$   r   r   Nr   r   r   r   r!   r!      s@         FFLLL      r   r!   c                   2     e Zd ZU dZded<   	 d fdZ xZS )InputGuardrailTripwireTriggered8Exception raised when a guardrail tripwire is triggered.r   guardrail_resultc                 ~    || _         t                                          d|j        j        j         d           d S Nz
Guardrail z triggered tripwirer&   superr   	guardrail	__class__r	   r   r&   r,   s     r   r   z(InputGuardrailTripwireTriggered.__init__.   I     0[)3=F[[[	
 	
 	
 	
 	
r   )r&   r   r	   r
   r   r   r   r   __classcell__r,   s   @r   r$   r$   (   sT         BB,,,,>
 
 
 
 
 
 
 
 
 
r   r$   c                   2     e Zd ZU dZded<   	 d fdZ xZS ) OutputGuardrailTripwireTriggeredr%   r   r&   c                 ~    || _         t                                          d|j        j        j         d           d S r(   r)   r-   s     r   r   z)OutputGuardrailTripwireTriggered.__init__;   r.   r   )r&   r   r/   r1   s   @r   r3   r3   5   sT         BB---->
 
 
 
 
 
 
 
 
 
r   r3   N)typingr   r+   r   r   	Exceptionr   r   r   r!   r$   r3   r   r   r   <module>r7      s>               GFFFFFFFF; ; ; ; ;i ; ; ;                     

 

 

 

 

o 

 

 



 

 

 

 

 

 

 

 

 

r   