
    Ngr                     J    d dl mZmZ d dlmZ d dlmZ  G d de          ZdS )    )AnyDict)pre_init)
BaseOpenAIc                        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                     dS )NF )clss    [/var/www/html/ai-engine/env/lib/python3.11/site-packages/langchain_community/llms/openlm.pyis_lc_serializablezOpenLM.is_lc_serializable   s    u    c                 @    i d| j         it                      j        S )Nmodel)
model_namesuper_invocation_params)self	__class__s    r   r   zOpenLM._invocation_params   s!    K7DO,K0JKKr   valuesc                     	 dd l }|j        |d<   n# t          $ r t          d          w xY w|d         rt          d          |S )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   sv    	MMM%0F8 	 	 	?  	
 + 	DBCCCs    +)__name__
__module____qualname____doc__classmethodboolr   propertyr   strr   r   r   r   __classcell__)r   s   @r   r   r      s        4    [ LDcN L L L L L XL $ 4    X    r   r   N)typingr   r   langchain_core.utilsr   langchain_community.llms.openair   r   r   r   r   <module>r,      su            ) ) ) ) ) ) 6 6 6 6 6 6    Z     r   