
    g3fi
                    h    d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	  G d de      Z
 G d d	e
      Zy
)zGeneration output schema.    )annotations)AnyLiteral)Serializable)merge_dictsc                  b    e Zd ZU dZded<   	 dZded<   	 d Zded<   	 edd	       Zedd
       Z	y)
GenerationaX  A single text generation output.

    Generation represents the response from an "old-fashioned" LLM (string-in,
    string-out) that generates regular text (not chat messages).

    This model is used internally by chat model and will eventually
    be mapped to a more general `LLMResult` object, and then projected into
    an `AIMessage` object.

    LangChain users working with chat models will usually access information via
    `AIMessage` (returned from runnable interfaces) or `LLMResult` (available
    via callbacks). Please refer to `AIMessage` and `LLMResult` for more information.
    strtextNzdict[str, Any] | Nonegeneration_infozLiteral['Generation']typec                     y)z,Return `True` as this class is serializable.T clss    _/var/www/auto_recruiter/arenv/lib/python3.12/site-packages/langchain_core/outputs/generation.pyis_lc_serializablezGeneration.is_lc_serializable(   s         c                
    g dS )zuGet the namespace of the LangChain object.

        Returns:
            `["langchain", "schema", "output"]`
        )	langchainschemaoutputr   r   s    r   get_lc_namespacezGeneration.get_lc_namespace-   s
     10r   )returnbool)r   z	list[str])
__name__
__module____qualname____doc____annotations__r   r   classmethodr   r   r   r   r   r	   r	      s[     I -1O*1 #/D
.
   1 1r   r	   c                      e Zd ZdZddZy)GenerationChunkzJ`GenerationChunk`, which can be concatenated with other Generation chunks.c                   t        |t              rPt        | j                  xs i |j                  xs i       }t        | j                  |j                  z   |xs d      S dt        |        dt        |       d}t        |      )a"  Concatenate two `GenerationChunk`s.

        Args:
            other: Another `GenerationChunk` to concatenate with.

        Raises:
            TypeError: If other is not a `GenerationChunk`.

        Returns:
            A new `GenerationChunk` concatenated from self and other.
        N)r   r   z$unsupported operand type(s) for +: 'z' and '')
isinstancer#   r   r   r   r   	TypeError)selfotherr   msgs       r   __add__zGenerationChunk.__add__:   s     e_-)$$*%%+O #YY+ / 74  5T$ZLU}TUVnr   N)r)   r#   r   r#   )r   r   r   r   r+   r   r   r   r#   r#   7   s
    Tr   r#   N)r   
__future__r   typingr   r   langchain_core.loadr   langchain_core.utils._merger   r	   r#   r   r   r   <module>r0      s-     "  , 3)1 )1Xj r   