
    -`i                         d dl mZmZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ ed         Ze
e G d d	                                  Zd
S )    )AnyLiteral)model_validator)	dataclass)Self)config)	safe_hash)autoxgrammarguidanceoutlineszlm-format-enforcerc                       e Zd ZU dZdZeed<   	 dZeed<   	 dZ	eed<   	 dZ
eed<   	 dZeed	<   	 dZeed
<   	 dZeed<   	 defdZ ed          defd            ZdS )StructuredOutputsConfigzBDataclass which contains structured outputs config for the engine.r
   backendFdisable_fallbackdisable_any_whitespacedisable_additional_properties reasoning_parserreasoning_parser_pluginenable_in_reasoningreturnc                     g }t          t          |                                          d                                          }|S )a  
        WARNING: Whenever a new field is added to this config,
        ensure that it is included in the factors list if
        it affects the computation graph.

        Provide a hash that uniquely identifies all the configs
        that affect the structure of the computation
        graph from input ids/embeddings to the final hidden states,
        excluding anything before input ids/embeddings and after
        the final hidden states.
        F)usedforsecurity)r	   strencode	hexdigest)selffactorshash_strs      r/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/vllm/config/structured_outputs.pycompute_hashz$StructuredOutputsConfig.compute_hash0   s>      S\\0022EJJJTTVV    after)modec                     | j         r| j        dvrt          d          | j        r| j        dk    rt          d          | S )N)r   r   zLdisable_any_whitespace is only supported for xgrammar and guidance backends.r   zIdisable_additional_properties is only supported for the guidance backend.)r   r   
ValueErrorr   )r   s    r!   "_validate_structured_output_configz:StructuredOutputsConfig._validate_structured_output_configB   sh    & 	4<?W+W+W2   - 	$,*2L2L,   r#   N)__name__
__module____qualname____doc__r   StructuredOutputsBackend__annotations__r   boolr   r   r   r   r   r   r"   r   r   r(    r#   r!   r   r      s         ML(.G%...= #d"""L#(D((( +0!4///M cK#%S%%% %%%%8c    $ _'"""D    #"  r#   r   N)typingr   r   pydanticr   pydantic.dataclassesr   typing_extensionsr   vllm.config.utilsr   vllm.utils.hashingr	   r-   r   r0   r#   r!   <module>r7      s             $ $ $ $ $ $ * * * * * * " " " " " " $ $ $ $ $ $ ( ( ( ( ( ("D 
 
: : : : : : :  : : :r#   