o
    #1 i)                     @   s   d dl m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G dd deZdS )    )Optionalc                   @   s8   e Zd ZU dZdZeed< 	ddee 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   e/home/app/PaddleOCR-VL-test/.venv_paddleocr/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	   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
   7   r   z InvalidRequestException.__init__r   r   r   r   r	   r   4   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
   C   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
   O   r   z)InvalidMessageStructureException.__init__r   r   r   r   r	   r   L   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
   [   r   z)InvalidAssistantMessageException.__init__r   r   r   r   r	   r    X   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
   g   r   z$InvalidToolMessageException.__init__r   r   r   r   r	   r!   d   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
   s   r   z#InvalidToolSchemaException.__init__r   r   r   r   r	   r"   p   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#   |   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)typingr   	Exceptionr   r   r   r   r   r   r    r!   r"   r#   r$   r%   r   r   r   r	   <module>   s    