o
    :/i
                     @   sZ   d dl mZ d dlmZmZ ddlmZ ddlmZ ddl	m
Z
mZ eG dd dZd	S )
    )Mapping)	dataclassfield   )MultiModalHasher)MultiModalHashes)MultiModalDataItemsMultiModalUUIDItemsc                   @   s   e Zd ZU dZeee B ed< eed< dZ	e
dB ed< eedZeeef ed< eedZeeef ed< d	ed
efddZdS )ProcessorInputszq
    Represents the keyword arguments to
    [`vllm.multimodal.processing.BaseMultiModalProcessor.apply`][].
    promptmm_data_itemsNmm_uuid_items)default_factoryhf_processor_mm_kwargstokenization_kwargsmodel_idreturnc              	      s   | j }| jpi }| ji }t | D ]U\}|v rZ| }g }t| D ]-\}}	|| }
|
d u s5rO|
d ur;|
n|	}	| jddi|	i q'||
 q'||< q fdd|D |< q|S )Nr   c                    s(   g | ]} j dd i|iqS )r    )hash_kwargs).0itemhasherr   modalityr   r   n/lsinfo/ai/hellotax_ai/llm_service/venv_vllm/lib/python3.10/site-packages/vllm/multimodal/processing/inputs.py
<listcomp>=   s    z1ProcessorInputs.get_mm_hashes.<locals>.<listcomp>r   )	r   r   r   r   items	enumerateget_all_items_for_hashappendr   )selfr   r   r   	mm_hashes
data_items
uuid_itemshashesir   	uuid_itemr   r   r   get_mm_hashes   s8   

	zProcessorInputs.get_mm_hashes)__name__
__module____qualname____doc__strlistint__annotations__r   r   r	   r   dictr   r   objectr   r   r'   r   r   r   r   r
      s   
 r
   N)collections.abcr   dataclassesr   r   r   r   inputsr   parser   r	   r
   r   r   r   r   <module>   s   