o
    AgB                     @   s.  d Z ddlZddlmZmZmZmZ ddlmZ ddl	m
Z
 ddlmZ defdd	Zdefd
dZdefddZdefddZdefddZdefddZdefddZdefddZdefddZdefddZdefddZdefddZdefd d!Zdefd"d#Zdefd$d%Zdefd&d'Zdefd(d)Zdefd*d+Zdefd,d-Zdefd.d/Z defd0d1Z!defd2d3Z"defd4d5Z#defd6d7Z$defd8d9Z%defd:d;Z&defd<d=Z'defd>d?Z(defd@dAZ)defdBdCZ*defdDdEZ+defdFdGZ,defdHdIZ-defdJdKZ.defdLdMZ/defdNdOZ0defdPdQZ1defdRdSZ2defdTdUZ3defdVdWZ4defdXdYZ5defdZd[Z6defd\d]Z7defd^d_Z8defd`daZ9defdbdcZ:defdddeZ;defdfdgZ<defdhdiZ=defdjdkZ>defdldmZ?defdndoZ@defdpdqZAdefdrdsZBdefdtduZCdefdvdwZDdefdxdyZEdefdzd{ZFdefd|d}ZGdefd~dZHdefddZIdefddZJdefddZKdefddZLdefddZMdefddZNdefddZOdefddZPdefddZQdefddZRdefddZSdefddZTdefddZUdefddZVdefddZWdefddZXdefddZYdefddZZdefddZ[defddZ\defddZ]defddZ^defddZ_defddZ`defddZadebdefddZcg dZddeebeg ee
 f f fddZedS )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returnc                  C      ddl m}  | S )Nr   AI21)langchain_community.llms.ai21r   r    r   ^/var/www/html/development/chatbot/venv/lib/python3.10/site-packages/langchain/llms/__init__.py_import_ai21      r   c                  C   r
   )Nr   
AlephAlpha)$langchain_community.llms.aleph_alphar   r   r   r   r   _import_aleph_alpha$   r   r   c                  C   r
   )Nr   AmazonAPIGateway)+langchain_community.llms.amazon_api_gatewayr   r   r   r   r   _import_amazon_api_gateway*   r   r   c                  C   r
   )Nr   	Anthropic)"langchain_community.llms.anthropicr   r   r   r   r   _import_anthropic0   r   r   c                  C   r
   )Nr   Anyscale)!langchain_community.llms.anyscaler   r   r   r   r   _import_anyscale6   r   r!   c                  C   r
   )Nr   Arcee)langchain_community.llms.arceer#   r"   r   r   r   _import_arcee<   r   r%   c                  C   r
   )Nr   Aviary)langchain_community.llms.aviaryr'   r&   r   r   r   _import_aviaryB   r   r)   c                  C   r
   )Nr   AzureMLOnlineEndpoint))langchain_community.llms.azureml_endpointr+   r*   r   r   r   _import_azureml_endpointH   r   r-   c                  C   r
   )Nr   QianfanLLMEndpoint)/langchain_community.llms.baidu_qianfan_endpointr/   r.   r   r   r   _import_baidu_qianfan_endpointN   r   r1   c                  C   r
   )Nr   Banana)"langchain_community.llms.bananadevr3   r2   r   r   r   _import_bananadevT   r   r5   c                  C   r
   )Nr   Baseten) langchain_community.llms.basetenr7   r6   r   r   r   _import_basetenZ   r   r9   c                  C   r
   )Nr   Beam)langchain_community.llms.beamr;   r:   r   r   r   _import_beam`   r   r=   c                  C   r
   )Nr   Bedrock) langchain_community.llms.bedrockr?   r>   r   r   r   _import_bedrockf   r   rA   c                  C   r
   )Nr   NIBittensorLLM)"langchain_community.llms.bittensorrC   rB   r   r   r   _import_bittensorl   r   rE   c                  C   r
   )Nr   CerebriumAI)$langchain_community.llms.cerebriumairG   rF   r   r   r   _import_cerebriumair   r   rI   c                  C   r
   )Nr   ChatGLM) langchain_community.llms.chatglmrK   rJ   r   r   r   _import_chatglmx   r   rM   c                  C   r
   )Nr   Clarifai)!langchain_community.llms.clarifairO   rN   r   r   r   _import_clarifai~   r   rQ   c                  C   r
   )Nr   Cohere)langchain_community.llms.cohererS   rR   r   r   r   _import_cohere   r   rU   c                  C   r
   )Nr   CTransformers)&langchain_community.llms.ctransformersrW   rV   r   r   r   _import_ctransformers   r   rY   c                  C   r
   )Nr   CTranslate2)$langchain_community.llms.ctranslate2r[   rZ   r   r   r   _import_ctranslate2   r   r]   c                  C   r
   )Nr   
Databricks)#langchain_community.llms.databricksr_   r^   r   r   r   _import_databricks   r   ra   c                  C   r
   )Nr   ChatDatabricks)*langchain_community.chat_models.databricksrc   rb   r   r   r   _import_databricks_chat   r   re   c                  C   r
   )Nr   	DeepInfra)"langchain_community.llms.deepinfrarg   rf   r   r   r   _import_deepinfra   r   ri   c                  C   r
   )Nr   
DeepSparse)#langchain_community.llms.deepsparserk   rj   r   r   r   _import_deepsparse   r   rm   c                  C   r
   )Nr   EdenAI)langchain_community.llms.edenairo   rn   r   r   r   _import_edenai   r   rq   c                  C   r
   )Nr   FakeListLLM)langchain_core.language_modelsrs   rr   r   r   r   _import_fake   r   ru   c                  C   r
   )Nr   	Fireworks)"langchain_community.llms.fireworksrw   rv   r   r   r   _import_fireworks   r   ry   c                  C   r
   )Nr   ForefrontAI)$langchain_community.llms.forefrontair{   rz   r   r   r   _import_forefrontai   r   r}   c                  C   r
   )Nr   GigaChat)!langchain_community.llms.gigachatr   r~   r   r   r   _import_gigachat   r   r   c                  C   r
   )Nr   
GooglePalm)$langchain_community.llms.google_palmr   r   r   r   r   _import_google_palm   r   r   c                  C   r
   )Nr   GooseAI) langchain_community.llms.gooseair   r   r   r   r   _import_gooseai   r   r   c                  C   r
   )Nr   GPT4All) langchain_community.llms.gpt4allr   r   r   r   r   _import_gpt4all   r   r   c                  C   r
   )Nr   GradientLLM)$langchain_community.llms.gradient_air   r   r   r   r   _import_gradient_ai   r   r   c                  C   r
   )Nr   HuggingFaceEndpoint)-langchain_community.llms.huggingface_endpointr   r   r   r   r   _import_huggingface_endpoint   r   r   c                  C   r
   )Nr   HuggingFaceHub)(langchain_community.llms.huggingface_hubr   r   r   r   r   _import_huggingface_hub   r   r   c                  C   r
   )Nr   HuggingFacePipeline)-langchain_community.llms.huggingface_pipeliner   r   r   r   r   _import_huggingface_pipeline   r   r   c                  C   r
   )Nr   HuggingFaceTextGenInference)7langchain_community.llms.huggingface_text_gen_inferencer   r   r   r   r   &_import_huggingface_text_gen_inference      r   c                  C   r
   )Nr   HumanInputLLM)langchain_community.llms.humanr   r   r   r   r   _import_human   r   r   c                  C   r
   )Nr   JavelinAIGateway)+langchain_community.llms.javelin_ai_gatewayr   r   r   r   r   _import_javelin_ai_gateway  r   r   c                  C   r
   )Nr   KoboldApiLLM)!langchain_community.llms.koboldair   r   r   r   r   _import_koboldai
  r   r   c                  C   r
   )Nr   LlamaCpp)!langchain_community.llms.llamacppr   r   r   r   r   _import_llamacpp  r   r   c                  C   r
   )Nr   ManifestWrapper)!langchain_community.llms.manifestr   r   r   r   r   _import_manifest  r   r   c                  C   r
   )Nr   Minimax) langchain_community.llms.minimaxr   r   r   r   r   _import_minimax  r   r   c                  C   r
   )Nr   Mlflow)langchain_community.llms.mlflowr   r   r   r   r   _import_mlflow"  r   r   c                  C   r
   )Nr   
ChatMlflow)&langchain_community.chat_models.mlflowr   r   r   r   r   _import_mlflow_chat(  r   r   c                  C   r
   )Nr   MlflowAIGateway)*langchain_community.llms.mlflow_ai_gatewayr   r   r   r   r   _import_mlflow_ai_gateway.  r   r   c                  C   r
   )Nr   Modal)langchain_community.llms.modalr   r   r   r   r   _import_modal4  r   r   c                  C   r
   )Nr   MosaicML)!langchain_community.llms.mosaicmlr   r   r   r   r   _import_mosaicml:  r   r   c                  C   r
   )Nr   NLPCloud)!langchain_community.llms.nlpcloudr   r   r   r   r   _import_nlpcloud@  r   r   c                  C   r
   )Nr   OctoAIEndpoint)(langchain_community.llms.octoai_endpointr   r   r   r   r   _import_octoai_endpointF  r   r   c                  C   r
   )Nr   Ollama)langchain_community.llms.ollamar   r   r   r   r   _import_ollamaL  r   r   c                  C   r
   )Nr   OpaquePrompts)&langchain_community.llms.opaquepromptsr   r   r   r   r   _import_opaquepromptsR  r   r   c                  C   r
   )Nr   AzureOpenAI)langchain_community.llms.openair   r   r   r   r   _import_azure_openaiX  r   r   c                  C   r
   )Nr   OpenAI)r   r   r   r   r   r   _import_openai^  r   r   c                  C   r
   )Nr   
OpenAIChat)r   r   r   r   r   r   _import_openai_chatd  r   r   c                  C   r
   )Nr   OpenLLM) langchain_community.llms.openllmr   r   r   r   r   _import_openllmj  r   r   c                  C   r
   )Nr   OpenLM)langchain_community.llms.openlmr   r   r   r   r   _import_openlmp  r   r   c                  C   r
   )Nr   PaiEasEndpoint))langchain_community.llms.pai_eas_endpointr   r   r   r   r   _import_pai_eas_endpointv  r   r   c                  C   r
   )Nr   Petals)langchain_community.llms.petalsr   r   r   r   r   _import_petals|  r   r   c                  C   r
   )Nr   
PipelineAI)#langchain_community.llms.pipelineair   r   r   r   r   _import_pipelineai  r   r   c                  C   r
   )Nr   	Predibase)"langchain_community.llms.predibaser   r   r   r   r   _import_predibase  r   r   c                  C   r
   )Nr   PredictionGuard)(langchain_community.llms.predictionguardr  r  r   r   r   _import_predictionguard  r   r  c                  C   r
   )Nr   PromptLayerOpenAI)+langchain_community.llms.promptlayer_openair  r  r   r   r   _import_promptlayer  r   r  c                  C   r
   )Nr   PromptLayerOpenAIChat)r  r
  r	  r   r   r   _import_promptlayer_chat  r   r  c                  C   r
   )Nr   	Replicate)"langchain_community.llms.replicater  r  r   r   r   _import_replicate  r   r  c                  C   r
   )Nr   RWKV)langchain_community.llms.rwkvr  r  r   r   r   _import_rwkv  r   r  c                  C   r
   )Nr   SagemakerEndpoint)+langchain_community.llms.sagemaker_endpointr  r  r   r   r   _import_sagemaker_endpoint  r   r  c                  C   r
   )Nr   SelfHostedPipeline)$langchain_community.llms.self_hostedr  r  r   r   r   _import_self_hosted  r   r  c                  C   r
   )Nr   SelfHostedHuggingFaceLLM)1langchain_community.llms.self_hosted_hugging_facer  r  r   r   r    _import_self_hosted_hugging_face  r   r  c                  C   r
   )Nr   StochasticAI)%langchain_community.llms.stochasticair!  r   r   r   r   _import_stochasticai  r   r#  c                  C   r
   )Nr   Nebula)'langchain_community.llms.symblai_nebular%  r$  r   r   r   _import_symblai_nebula  r   r'  c                  C   r
   )Nr   TextGen) langchain_community.llms.textgenr)  r(  r   r   r   _import_textgen  r   r+  c                  C   r
   Nr   TitanTakeoff&langchain_community.llms.titan_takeoffr.  r-  r   r   r   _import_titan_takeoff  r   r1  c                  C   r
   r,  r/  r-  r   r   r   _import_titan_takeoff_pro  r   r2  c                  C   r
   )Nr   Together)!langchain_community.llms.togetherr4  r3  r   r   r   _import_together  r   r6  c                  C   r
   )Nr   Tongyi)langchain_community.llms.tongyir8  r7  r   r   r   _import_tongyi  r   r:  c                  C   r
   )Nr   VertexAI)!langchain_community.llms.vertexair<  r;  r   r   r   _import_vertex  r   r>  c                  C   r
   )Nr   VertexAIModelGarden)r=  r@  r?  r   r   r   _import_vertex_model_garden  r   rA  c                  C   r
   )Nr   VLLM)langchain_community.llms.vllmrC  rB  r   r   r   _import_vllm  r   rE  c                  C   r
   )Nr   
VLLMOpenAI)rD  rG  rF  r   r   r   _import_vllm_openai  r   rH  c                  C   r
   )Nr   
WatsonxLLM)#langchain_community.llms.watsonxllmrJ  rI  r   r   r   _import_watsonxllm  r   rL  c                  C   r
   )Nr   Writer)langchain_community.llms.writerrN  rM  r   r   r   _import_writer  r   rP  c                  C   r
   )Nr   
Xinference)#langchain_community.llms.xinferencerR  rQ  r   r   r   _import_xinference  r   rT  c                  C   r
   )Nr   	YandexGPT)langchain_community.llms.yandexrV  rU  r   r   r   _import_yandex_gpt  r   rX  c                  C   r
   )Nr   VolcEngineMaasLLM)(langchain_community.llms.volcengine_maasrZ  rY  r   r   r   _import_volcengine_maas  r   r\  namec                 C   sR   ddl m} t stjd|  dtd | dkr$dd t  D }|S t|| S )	Nr   )llmszImporting 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_dictc                 S   s   i | ]\}}|| qS r   r   ).0kvr   r   r   
<dictcomp>0  s    z__getattr__.<locals>.<dictcomp>)	langchain_communityr^  r   warningswarnr   get_type_to_cls_dictitemsgetattr)r]  r^  r`  r   r   r   __getattr__   s   	
rk  )Qr   r   r   r   r   r#   r'   r+   r   r3   r7   r;   r?   rW   r[   rG   rK   rO   rS   r_   rg   rk   ro   rs   rw   r{   r   r   r   r   r   r   r   r   r   r   r   r   r)  r   r   r   r   r   r%  rC   r   r   r   r   r   r   r   r   r   r   r  r  r
  r   r  r  r  r  r  r!  r.  TitanTakeoffPror8  r<  r@  rC  rG  rJ  rN  r   rR  r   r/   rV  rZ  c                   C   s  i d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dtdtdtdti d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dtd td!t d"t!i d#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i d4t3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
databrickszdatabricks-chat	deepinfra
deepsparseedenaiz	fake-listforefrontaizgiga-chat-modelgoogle_palmgooseaigradientgpt4allhuggingface_endpointhuggingface_hubhuggingface_pipelinehuggingface_textgen_inferencezhuman-inputkoboldaillamacpptextgenminimaxmlflowzmlflow-chatzmlflow-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
xinferencezjavelin-ai-gatewayqianfan_endpoint
yandex_gptrZ  )Nr   r   r   rA   r   r!   r%   r)   r   r-   r5   r9   r=   rI   rM   rQ   rU   rY   r]   ra   re   ri   rm   rq   ru   r}   r   r   r   r   r   r   r   r   r   r   r   r   r+  r   r   r   r   r   r   r'  rE   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r#  r6  r:  r1  r2  r>  rA  r   rE  rH  rL  rP  rT  r   r1   rX  r\  r   r   r   r   rh    s*  	
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDErh  )f__doc__rf  typingr   r   r   r   langchain_core._apir   #langchain_core.language_models.llmsr   langchain._api.interactive_envr   r   r   r   r   r!   r%   r)   r-   r1   r5   r9   r=   rA   rE   rI   rM   rQ   rU   rY   r]   ra   re   ri   rm   rq   ru   ry   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   r   r   r  r  r  r  r  r  r  r  r#  r'  r+  r1  r2  r6  r:  r>  rA  rE  rH  rL  rP  rT  rX  r\  strrk  __all__rh  r   r   r   r   <module>   s    &U