
    .`i                         d dl Z d dlmZ d dlmZ d dlmZ  e j        e          Z	dZ
dZdZdZdad	ed
eeeg ef         f         fdZd ZdS )    N)Callable)Anyzvllm.general_pluginszvllm.io_processor_pluginszvllm.platform_pluginszvllm.stat_logger_pluginsFgroupreturnc                    ddl m} t          j        } ||           }t	          |          dk    rt
                              d|            i S | t          k    }|rt
          j        nt
          j        } |d|            |D ]} |d|j	        |j
                   | |d           t          t          t          g t          f         f                     }|D ]p}|	|j	        |v rc| |d|j	                   	 |                                }|||j	        <   @# t           $ r# t
                              d	|j	                   Y lw xY wq|S )
Nr   )entry_pointsr   zNo plugins for group %s found.zAvailable plugins for group %s:z
- %s -> %sz^All plugins in this group will be loaded. Set `VLLM_PLUGINS` to control which plugins to load.zLoading plugin %szFailed to load plugin %s)importlib.metadatar   envsVLLM_PLUGINSlenloggerdebugDEFAULT_PLUGINS_GROUPinfonamevaluedictstrr   r   load	Exception	exception)	r   r   allowed_pluginsdiscovered_pluginsis_default_group	log_levelpluginpluginsfuncs	            i/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/vllm/plugins/__init__.pyload_plugins_by_groupr!      s   //////'O%E222
!##5u===	  55 0AfkII/777$ ; ;	,V\::::	C	
 	
 	

 3S))*,,G$ 	J 	J"fk_&D&D*	-v{;;;J{{}}'+$$ J J J  !;V[IIIIIJ 'E Ns   9D*EEc                      t           rdS da t          t                    } |                                 D ]} |             dS )zWARNING: plugins can be loaded for multiple times in different
    processes. They should be designed in a way that they can be loaded
    multiple times without causing issues.
    NTr	   )plugins_loadedr!   r   values)r   r   s     r    load_general_pluginsr%   D   sW      N#*?@@@G         )loggingcollections.abcr   typingr   	vllm.envsr   	getLogger__name__r   r   IO_PROCESSOR_PLUGINS_GROUPPLATFORM_PLUGINS_GROUPSTAT_LOGGER_PLUGINS_GROUPr#   r   r   r!   r%    r&   r    <module>r1      s     $ $ $ $ $ $            		8	$	$ / 8  1  7  % %c8BG3D.D)E % % % %P    r&   