a
    bŠÝgr  ã                   @   s<   d dl mZmZ d dlmZ d dlmZ G dd„ deƒZdS )é    )ÚAnyÚDict)Úpre_init)Ú
BaseOpenAIc                       sX   e Zd ZdZeedœdd„ƒZeee	e
f dœ‡ fdd„ƒZeeedœdd	„ƒZ‡  ZS )
ÚOpenLMzOpenLM models.)Úreturnc                 C   s   dS )NF© )Úclsr   r   úm/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/langchain_community/llms/openlm.pyÚis_lc_serializable   s    zOpenLM.is_lc_serializablec                    s   i d| j i¥tƒ j¥S )NÚmodel)Z
model_nameÚsuperÚ_invocation_params)Úself©Ú	__class__r   r
   r      s    zOpenLM._invocation_params)Úvaluesr   c                 C   sF   zdd l }|j|d< W n ty0   tdƒ‚Y n0 |d rBtdƒ‚|S )Nr   ÚclientzTCould not import openlm python package. Please install it with `pip install openlm`.Z	streamingz#Streaming not supported with openlm)ÚopenlmZ
CompletionÚImportErrorÚ
ValueError)r	   r   r   r   r   r
   Úvalidate_environment   s    ÿ
zOpenLM.validate_environment)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚclassmethodÚboolr   Úpropertyr   Ústrr   r   r   r   Ú__classcell__r   r   r   r
   r      s   r   N)Útypingr   r   Zlangchain_core.utilsr   Zlangchain_community.llms.openair   r   r   r   r   r
   Ú<module>   s   