
    7|hr                     B    d dl mZmZ d dlmZ d dlmZ  G d de      Zy)    )AnyDict)pre_init)
BaseOpenAIc                   l     e Zd ZdZedefd       Zedee	e
f   f fd       Zededefd       Z xZS )OpenLMzOpenLM models.returnc                      y)NF )clss    ^/var/www/html/test/engine/venv/lib/python3.12/site-packages/langchain_community/llms/openlm.pyis_lc_serializablezOpenLM.is_lc_serializable   s        c                 8    i d| j                   it        |   S )Nmodel)
model_namesuper_invocation_params)self	__class__s    r   r   zOpenLM._invocation_params   s!    K7DOO,K0JKKr   valuesc                 ~    	 dd l }|j                  |d<   |d   rt        d      |S # t        $ r t        d      w xY w)Nr   clientzTCould not import openlm python package. Please install it with `pip install openlm`.	streamingz#Streaming not supported with openlm)openlm
CompletionImportError
ValueError)r   r   r   s      r   validate_environmentzOpenLM.validate_environment   sX    	%00F8 +BCC  	? 	s   ' <)__name__
__module____qualname____doc__classmethodboolr   propertyr   strr   r   r   r   __classcell__)r   s   @r   r   r      sg    4   LDcN L L $ 4  r   r   N)typingr   r   langchain_core.utilsr   langchain_community.llms.openair   r   r   r   r   <module>r,      s     ) 6Z r   