o
    i                     @   s   G d d de ZG dd deZG dd deZG dd deZG dd	 d	eZG d
d deZG dd deZG dd deZG dd deZ	G dd deZ
G dd deZG dd deZdS )c                   @   s8   e Zd ZU dZdZeed< 	ddedB ddfddZdS )	MistralCommonExceptionz|Base class for all Mistral exceptions.

    Attributes:
        message: A human-readable message describing the error.
    zInternal server errormessageNreturnc                 C   s   |r|| _ dS dS )zInitialize the `MistralCommonException` with an optional message.

        If no message is provided, the default message is used.

        Args:
           message: A human-readable message describing the error.
        N)r   selfr    r   M/home/ubuntu/.local/lib/python3.10/site-packages/mistral_common/exceptions.py__init__
   s   
zMistralCommonException.__init__)N)__name__
__module____qualname____doc__r   str__annotations__r   r   r   r   r   r      s   
 r   c                       *   e Zd ZdZdeddf fddZ  ZS )TokenizerExceptionz-Exception raised for errors in the tokenizer.r   r   Nc                       t  | dS )zInitialize the `TokenizerException` with a message.

        Args:
          message: A human-readable message describing the error.
        Nsuperr   r   	__class__r   r   r         zTokenizerException.__init__r	   r
   r   r   r   r   __classcell__r   r   r   r   r          r   c                       r   )$UnsupportedTokenizerFeatureExceptionz;Exception raised for unsupported features in the tokenizer.r   r   Nc                    r   )zInitialize the `UnsupportedTokenizerFeatureException` with a message.

        Args:
           message: A human-readable message describing the error.
        Nr   r   r   r   r   r   (   r   z-UnsupportedTokenizerFeatureException.__init__r   r   r   r   r   r   %   r   r   c                       r   )InvalidRequestExceptionz&Exception raised for invalid requests.r   r   Nc                    r   )zInitialize the `InvalidRequestException` with a message.

        Args:
           message: A human-readable message describing the error.
        Nr   r   r   r   r   r   4   r   z InvalidRequestException.__init__r   r   r   r   r   r   1   r   r   c                       r   )InvalidSystemPromptExceptionz,Exception raised for invalid system prompts.r   r   Nc                    r   )zInitialize the `InvalidSystemPromptException` with a message.

        Args:
           message: A human-readable message describing the error.
        Nr   r   r   r   r   r   @   r   z%InvalidSystemPromptException.__init__r   r   r   r   r   r   =   r   r   c                       r   ) InvalidMessageStructureExceptionz0Exception raised for invalid message structures.r   r   Nc                    r   )zInitialize the `InvalidMessageStructureException` with a message.

        Args:
           message: A human-readable message describing the error.
        Nr   r   r   r   r   r   L   r   z)InvalidMessageStructureException.__init__r   r   r   r   r   r   I   r   r   c                       r   ) InvalidAssistantMessageExceptionz0Exception raised for invalid assistant messages.r   r   Nc                    r   )zInitialize the `InvalidAssistantMessageException` with a message.

        Args:
           message: A human-readable message describing the error.
        Nr   r   r   r   r   r   X   r   z)InvalidAssistantMessageException.__init__r   r   r   r   r   r   U   r   r   c                       r   )InvalidToolMessageExceptionz+Exception raised for invalid tool messages.r   r   Nc                    r   )zInitialize the `InvalidToolMessageException` with a message.

        Args:
           message: A human-readable message describing the error.
        Nr   r   r   r   r   r   d   r   z$InvalidToolMessageException.__init__r   r   r   r   r   r   a   r   r   c                       r   )InvalidToolSchemaExceptionz*Exception raised for invalid tool schemas.r   r   Nc                    r   )zInitialize the `InvalidToolSchemaException` with a message.

        Args:
           message: A human-readable message describing the error.
        Nr   r   r   r   r   r   p   r   z#InvalidToolSchemaException.__init__r   r   r   r   r   r    m   r   r    c                       r   )InvalidUserMessageExceptionz+Exception raised for invalid user messages.r   r   Nc                    r   )zInitialize the `InvalidUserMessageException` with a message.

        Args:
           message: A human-readable message describing the error.
        Nr   r   r   r   r   r   |   r   z$InvalidUserMessageException.__init__r   r   r   r   r   r!   y   r   r!   c                       r   )InvalidFunctionCallExceptionz,Exception raised for invalid function calls.r   r   Nc                    r   )zInitialize the `InvalidFunctionCallException` with a message.

        Args:
           message: A human-readable message describing the error.
        Nr   r   r   r   r   r      r   z%InvalidFunctionCallException.__init__r   r   r   r   r   r"      r   r"   c                       r   )InvalidToolExceptionz#Exception raised for invalid tools.r   r   Nc                    r   )zInitialize the `InvalidToolException` with a message.

        Args:
           message: A human-readable message describing the error.
        Nr   r   r   r   r   r      r   zInvalidToolException.__init__r   r   r   r   r   r#      r   r#   N)	Exceptionr   r   r   r   r   r   r   r   r    r!   r"   r#   r   r   r   r   <module>   s    