HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/langchain/llms/__pycache__/__init__.cpython-310.pyc
o

���g�B�@s.dZddlZddlmZmZmZmZddlmZddl	m
Z
ddlmZdefdd	�Z
defd
d�Zdefdd
�Zdefdd�Zdefdd�Zdefdd�Zdefdd�Zdefdd�Zdefdd�Zdefdd�Zdefdd�Zdefdd�Zdefd d!�Zdefd"d#�Zdefd$d%�Zdefd&d'�Zdefd(d)�Zdefd*d+�Zdefd,d-�Zdefd.d/�Z defd0d1�Z!defd2d3�Z"defd4d5�Z#defd6d7�Z$defd8d9�Z%defd:d;�Z&defd<d=�Z'defd>d?�Z(defd@dA�Z)defdBdC�Z*defdDdE�Z+defdFdG�Z,defdHdI�Z-defdJdK�Z.defdLdM�Z/defdNdO�Z0defdPdQ�Z1defdRdS�Z2defdTdU�Z3defdVdW�Z4defdXdY�Z5defdZd[�Z6defd\d]�Z7defd^d_�Z8defd`da�Z9defdbdc�Z:defddde�Z;defdfdg�Z<defdhdi�Z=defdjdk�Z>defdldm�Z?defdndo�Z@defdpdq�ZAdefdrds�ZBdefdtdu�ZCdefdvdw�ZDdefdxdy�ZEdefdzd{�ZFdefd|d}�ZGdefd~d�ZHdefd�d��ZIdefd�d��ZJdefd�d��ZKdefd�d��ZLdefd�d��ZMdefd�d��ZNdefd�d��ZOdefd�d��ZPdefd�d��ZQdefd�d��ZRdefd�d��ZSdefd�d��ZTdefd�d��ZUdefd�d��ZVdefd�d��ZWdefd�d��ZXdefd�d��ZYdefd�d��ZZdefd�d��Z[defd�d��Z\defd�d��Z]defd�d��Z^defd�d��Z_defd�d��Z`defd�d��Zad�ebdefd�d��Zcgd��Zddeebegee
fffd�d��ZedS)�a�
**LLM** classes provide
access to the large language model (**LLM**) APIs and services.

**Class hierarchy:**

.. code-block::

    BaseLanguageModel --> BaseLLM --> LLM --> <name>  # Examples: AI21, HuggingFaceHub, OpenAI

**Main helpers:**

.. code-block::

    LLMResult, PromptValue,
    CallbackManagerForLLMRun, AsyncCallbackManagerForLLMRun,
    CallbackManager, AsyncCallbackManager,
    AIMessage, BaseMessage
�N)�Any�Callable�Dict�Type)�LangChainDeprecationWarning)�BaseLLM)�is_interactive_env�returncC�ddlm}|S)Nr��AI21)�langchain_community.llms.ai21rr�r�B/usr/local/lib/python3.10/dist-packages/langchain/llms/__init__.py�_import_ai21�rcCr
)Nr��
AlephAlpha)�$langchain_community.llms.aleph_alpharrrrr�_import_aleph_alpha$rrcCr
)Nr��AmazonAPIGateway)�+langchain_community.llms.amazon_api_gatewayrrrrr�_import_amazon_api_gateway*rrcCr
)Nr��	Anthropic)�"langchain_community.llms.anthropicrrrrr�_import_anthropic0rrcCr
)Nr��Anyscale)�!langchain_community.llms.anyscalerrrrr�_import_anyscale6rr!cCr
)Nr��Arcee)�langchain_community.llms.arceer#r"rrr�
_import_arcee<rr%cCr
)Nr��Aviary)�langchain_community.llms.aviaryr'r&rrr�_import_aviaryBrr)cCr
)Nr��AzureMLOnlineEndpoint)�)langchain_community.llms.azureml_endpointr+r*rrr�_import_azureml_endpointHrr-cCr
)Nr��QianfanLLMEndpoint)�/langchain_community.llms.baidu_qianfan_endpointr/r.rrr�_import_baidu_qianfan_endpointNrr1cCr
)Nr��Banana)�"langchain_community.llms.bananadevr3r2rrr�_import_bananadevTrr5cCr
)Nr��Baseten)� langchain_community.llms.basetenr7r6rrr�_import_basetenZrr9cCr
)Nr��Beam)�langchain_community.llms.beamr;r:rrr�_import_beam`rr=cCr
)Nr��Bedrock)� langchain_community.llms.bedrockr?r>rrr�_import_bedrockfrrAcCr
)Nr��NIBittensorLLM)�"langchain_community.llms.bittensorrCrBrrr�_import_bittensorlrrEcCr
)Nr��CerebriumAI)�$langchain_community.llms.cerebriumairGrFrrr�_import_cerebriumairrrIcCr
)Nr��ChatGLM)� langchain_community.llms.chatglmrKrJrrr�_import_chatglmxrrMcCr
)Nr��Clarifai)�!langchain_community.llms.clarifairOrNrrr�_import_clarifai~rrQcCr
)Nr��Cohere)�langchain_community.llms.cohererSrRrrr�_import_cohere�rrUcCr
)Nr��
CTransformers)�&langchain_community.llms.ctransformersrWrVrrr�_import_ctransformers�rrYcCr
)Nr��CTranslate2)�$langchain_community.llms.ctranslate2r[rZrrr�_import_ctranslate2�rr]cCr
)Nr��
Databricks)�#langchain_community.llms.databricksr_r^rrr�_import_databricks�rracCr
)Nr��ChatDatabricks)�*langchain_community.chat_models.databricksrcrbrrr�_import_databricks_chat�rrecCr
)Nr��	DeepInfra)�"langchain_community.llms.deepinfrargrfrrr�_import_deepinfra�rricCr
)Nr��
DeepSparse)�#langchain_community.llms.deepsparserkrjrrr�_import_deepsparse�rrmcCr
)Nr��EdenAI)�langchain_community.llms.edenairornrrr�_import_edenai�rrqcCr
)Nr��FakeListLLM)�langchain_core.language_modelsrsrrrrr�_import_fake�rrucCr
)Nr��	Fireworks)�"langchain_community.llms.fireworksrwrvrrr�_import_fireworks�rrycCr
)Nr��ForefrontAI)�$langchain_community.llms.forefrontair{rzrrr�_import_forefrontai�rr}cCr
)Nr��GigaChat)�!langchain_community.llms.gigachatrr~rrr�_import_gigachat�rr�cCr
)Nr��
GooglePalm)�$langchain_community.llms.google_palmr�r�rrr�_import_google_palm�rr�cCr
)Nr��GooseAI)� langchain_community.llms.gooseair�r�rrr�_import_gooseai�rr�cCr
)Nr��GPT4All)� langchain_community.llms.gpt4allr�r�rrr�_import_gpt4all�rr�cCr
)Nr��GradientLLM)�$langchain_community.llms.gradient_air�r�rrr�_import_gradient_ai�rr�cCr
)Nr��HuggingFaceEndpoint)�-langchain_community.llms.huggingface_endpointr�r�rrr�_import_huggingface_endpoint�rr�cCr
)Nr��HuggingFaceHub)�(langchain_community.llms.huggingface_hubr�r�rrr�_import_huggingface_hub�rr�cCr
)Nr��HuggingFacePipeline)�-langchain_community.llms.huggingface_pipeliner�r�rrr�_import_huggingface_pipeline�rr�cCr
)Nr��HuggingFaceTextGenInference)�7langchain_community.llms.huggingface_text_gen_inferencer�r�rrr�&_import_huggingface_text_gen_inference��r�cCr
)Nr��
HumanInputLLM)�langchain_community.llms.humanr�r�rrr�
_import_human�rr�cCr
)Nr��JavelinAIGateway)�+langchain_community.llms.javelin_ai_gatewayr�r�rrr�_import_javelin_ai_gatewayrr�cCr
)Nr��KoboldApiLLM)�!langchain_community.llms.koboldair�r�rrr�_import_koboldai
rr�cCr
)Nr��LlamaCpp)�!langchain_community.llms.llamacppr�r�rrr�_import_llamacpprr�cCr
)Nr��ManifestWrapper)�!langchain_community.llms.manifestr�r�rrr�_import_manifestrr�cCr
)Nr��Minimax)� langchain_community.llms.minimaxr�r�rrr�_import_minimaxrr�cCr
)Nr��Mlflow)�langchain_community.llms.mlflowr�r�rrr�_import_mlflow"rr�cCr
)Nr��
ChatMlflow)�&langchain_community.chat_models.mlflowr�r�rrr�_import_mlflow_chat(rr�cCr
)Nr��MlflowAIGateway)�*langchain_community.llms.mlflow_ai_gatewayr�r�rrr�_import_mlflow_ai_gateway.rr�cCr
)Nr��Modal)�langchain_community.llms.modalr�r�rrr�
_import_modal4rr�cCr
)Nr��MosaicML)�!langchain_community.llms.mosaicmlr�r�rrr�_import_mosaicml:rr�cCr
)Nr��NLPCloud)�!langchain_community.llms.nlpcloudr�r�rrr�_import_nlpcloud@rr�cCr
)Nr��OctoAIEndpoint)�(langchain_community.llms.octoai_endpointr�r�rrr�_import_octoai_endpointFrr�cCr
)Nr��Ollama)�langchain_community.llms.ollamar�r�rrr�_import_ollamaLrr�cCr
)Nr��
OpaquePrompts)�&langchain_community.llms.opaquepromptsr�r�rrr�_import_opaquepromptsRrr�cCr
)Nr��AzureOpenAI)�langchain_community.llms.openair�r�rrr�_import_azure_openaiXrr�cCr
)Nr��OpenAI)r�r�r�rrr�_import_openai^rr�cCr
)Nr��
OpenAIChat)r�r�r�rrr�_import_openai_chatdrr�cCr
)Nr��OpenLLM)� langchain_community.llms.openllmr�r�rrr�_import_openllmjrr�cCr
)Nr��OpenLM)�langchain_community.llms.openlmr�r�rrr�_import_openlmprr�cCr
)Nr��PaiEasEndpoint)�)langchain_community.llms.pai_eas_endpointr�r�rrr�_import_pai_eas_endpointvrr�cCr
)Nr��Petals)�langchain_community.llms.petalsr�r�rrr�_import_petals|rr�cCr
)Nr��
PipelineAI)�#langchain_community.llms.pipelineair�r�rrr�_import_pipelineai�rr�cCr
)Nr��	Predibase)�"langchain_community.llms.predibaser�r�rrr�_import_predibase�rrcCr
)Nr��PredictionGuard)�(langchain_community.llms.predictionguardrrrrr�_import_predictionguard�rrcCr
)Nr��PromptLayerOpenAI)�+langchain_community.llms.promptlayer_openairrrrr�_import_promptlayer�rrcCr
)Nr��PromptLayerOpenAIChat)rr
r	rrr�_import_promptlayer_chat�rrcCr
)Nr��	Replicate)�"langchain_community.llms.replicater
rrrr�_import_replicate�rrcCr
)Nr��RWKV)�langchain_community.llms.rwkvrrrrr�_import_rwkv�rrcCr
)Nr��SagemakerEndpoint)�+langchain_community.llms.sagemaker_endpointrrrrr�_import_sagemaker_endpoint�rrcCr
)Nr��SelfHostedPipeline)�$langchain_community.llms.self_hostedrrrrr�_import_self_hosted�rrcCr
)Nr��SelfHostedHuggingFaceLLM)�1langchain_community.llms.self_hosted_hugging_facerrrrr� _import_self_hosted_hugging_face�r�rcCr
)Nr��StochasticAI)�%langchain_community.llms.stochasticair!r rrr�_import_stochasticai�rr#cCr
)Nr��Nebula)�'langchain_community.llms.symblai_nebular%r$rrr�_import_symblai_nebula�rr'cCr
)Nr��TextGen)� langchain_community.llms.textgenr)r(rrr�_import_textgen�rr+cCr
�Nr��TitanTakeoff��&langchain_community.llms.titan_takeoffr.r-rrr�_import_titan_takeoff�rr1cCr
r,r/r-rrr�_import_titan_takeoff_pro�rr2cCr
)Nr��Together)�!langchain_community.llms.togetherr4r3rrr�_import_together�rr6cCr
)Nr��Tongyi)�langchain_community.llms.tongyir8r7rrr�_import_tongyi�rr:cCr
)Nr��VertexAI)�!langchain_community.llms.vertexair<r;rrr�_import_vertex�rr>cCr
)Nr��VertexAIModelGarden)r=r@r?rrr�_import_vertex_model_garden�rrAcCr
)Nr��VLLM)�langchain_community.llms.vllmrCrBrrr�_import_vllm�rrEcCr
)Nr��
VLLMOpenAI)rDrGrFrrr�_import_vllm_openai�rrHcCr
)Nr��
WatsonxLLM)�#langchain_community.llms.watsonxllmrJrIrrr�_import_watsonxllmrrLcCr
)Nr��Writer)�langchain_community.llms.writerrNrMrrr�_import_writerrrPcCr
)Nr��
Xinference)�#langchain_community.llms.xinferencerRrQrrr�_import_xinferencerrTcCr
)Nr��	YandexGPT)�langchain_community.llms.yandexrVrUrrr�_import_yandex_gptrrXcCr
)Nr��VolcEngineMaasLLM)�(langchain_community.llms.volcengine_maasrZrYrrr�_import_volcengine_maasrr\�namecCsRddlm}t�stjd|�d�td�|dkr$dd�t���D�}|St||�S)	Nr)�llmsz�Importing LLMs from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.llms import zL`.

To install langchain-community run `pip install -U langchain-community`.)�category�type_to_cls_dictcSsi|]\}}||��qSrr)�.0�k�vrrr�
<dictcomp>0s�z__getattr__.<locals>.<dictcomp>)	�langchain_communityr^r�warnings�warnr�get_type_to_cls_dict�items�getattr)r]r^r`rrr�__getattr__ s��	�
rk)Qrrrrrr#r'r+r�r3r7r;r?rWr[rGrKrOrSr_rgrkrorsrwr{rr�r�r�r�r�r�r�r�r�r�r�r)r�r�r�r�r�r%rCr�r�r�r�r�r�r�r�r�r�rrr
r�rr
rrrr!r.�TitanTakeoffPror8r<r@rCrGrJrNr�rRr�r/rVrZc
Cs�idt�dt�dt�dt�dt�dt�dt�dt�d	t�d
t	�dt
�dt�d
t�dt
�dt�dt�dt�idt�dt�dt�dt�dt�dt�dt�dt�dt�dt�dt�dt�dt�dt�d t�d!t �d"t!��id#t"�d$t#�d%t$�d&t%�d't&�d(t'�d)t(�d*t)�d+t*�d,t+�d-t,�d.t-�d/t.�d0t/�d1t0�d2t1�d3t2��id4t3�d5t4�d6t5�d7t6�d8t7�d9t8�d:t9�d;t:�d<t;�d=t<�d>t=�d?t>�d@t?�dAt@�dBtA�dCtB�dDtC��tDtDtEtFtGtHtItJtKtLtMdE��S)FN�ai21�aleph_alpha�amazon_api_gateway�amazon_bedrock�	anthropic�anyscale�arcee�aviary�azure�azureml_endpoint�	bananadev�baseten�beam�cerebriumai�chat_glm�clarifai�cohere�
ctransformers�ctranslate2�
databrickszdatabricks-chat�	deepinfra�
deepsparse�edenaiz	fake-list�forefrontaizgiga-chat-model�google_palm�gooseai�gradient�gpt4all�huggingface_endpoint�huggingface_hub�huggingface_pipeline�huggingface_textgen_inferencezhuman-input�koboldai�llamacpp�textgen�minimax�mlflowzmlflow-chatzmlflow-ai-gateway�modal�mosaic�nebula�nibittensor�nlpcloud�ollama�openai�openlm�pai_eas_endpoint�petals�
pipelineai�	predibase�
opaqueprompts�	replicate�rwkv�sagemaker_endpoint�self_hosted�self_hosted_hugging_face�stochasticai�together�tongyi�
titan_takeoff�titan_takeoff_pro�vertexai�vertexai_model_garden)�openllm�openllm_client�vllm�vllm_openai�
watsonxllm�writer�
xinferencezjavelin-ai-gateway�qianfan_endpoint�
yandex_gptrZ)NrrrrArr!r%r)r�r-r5r9r=rIrMrQrUrYr]rarerirmrqrur}r�r�r�r�r�r�r�r�r�r�r�r�r+r�r�r�r�r�r�r'rEr�r�r�r�r�r�r�rr�rrrrrr#r6r:r1r2r>rAr�rErHrLrPrTr�r1rXr\rrrrrh�s*��������	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�@�A�B�C�D�E�rh)f�__doc__rf�typingrrrr�langchain_core._apir�#langchain_core.language_models.llmsr�langchain._api.interactive_envrrrrrr!r%r)r-r1r5r9r=rArErIrMrQrUrYr]rarerirmrqruryr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr#r'r+r1r2r6r:r>rArErHrLrPrTrXr\�strrk�__all__rhrrrr�<module>s�&U