
    .`i                     :    d dl Z  G d de j        dd          ZdS )    Nc                       e Zd ZU dZeed<   eed<   dZeed<    ej	        d          Z
edz  ed<   dZedz  ed	<   d
Zeed<   d Zed             Zed             Zed             ZdedefdZdefdZdS )LoRARequesta  
    Request for a LoRA adapter.

    lora_int_id must be globally unique for a given adapter.
    This is currently not enforced in vLLM.

    load_inplace: If True, forces reloading the adapter even if one
        with the same lora_int_id already exists in the cache. This replaces
        the existing adapter in-place. If False (default), only loads if the
        adapter is not already loaded.
    	lora_namelora_int_id 	lora_pathN)defaultbase_model_nametensorizer_config_dictFload_inplacec                 l    | j         dk     rt          d| j                    | j        s
J d            d S )N   zid must be > 0, got zlora_path cannot be empty)r   
ValueErrorr   selfs    e/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/vllm/lora/request.py__post_init__zLoRARequest.__post_init__    sH    aFD4DFFGGG ~:::::~::    c                     | j         S N)r   r   s    r   
adapter_idzLoRARequest.adapter_id'   s    r   c                     | j         S r   )r   r   s    r   namezLoRARequest.name+   
    ~r   c                     | j         S r   )r   r   s    r   pathzLoRARequest.path/   r   r   valuereturnc                 L    t          || j                  o| j        |j        k    S )z
        Overrides the equality method to compare LoRARequest
        instances based on lora_name. This allows for identification
        and comparison lora adapter across engines.
        )
isinstance	__class__r   )r   r   s     r   __eq__zLoRARequest.__eq__3   s$     %00VT^u5VVr   c                 *    t          | j                  S )a  
        Overrides the hash method to hash LoRARequest instances
        based on lora_name. This ensures that LoRARequest instances
        can be used in hash-based collections such as sets and dictionaries,
        identified by their names across engines.
        )hashr   r   s    r   __hash__zLoRARequest.__hash__;   s     DN###r   )__name__
__module____qualname____doc__str__annotations__intr   msgspecfieldr
   r   dictr   boolr   propertyr   r   r   objectr"   r%    r   r   r   r      s2        

 
 NNNIs"/'-"="="=OS4Z===*.D4K...L$; ; ;     X    X   XWF Wt W W W W$# $ $ $ $ $ $r   r   T)omit_defaults
array_like)r-   Structr   r3   r   r   <module>r7      sR   
 :$ :$ :$ :$ :$N:$ :$ :$ :$ :$ :$r   