
    hB                     ~   d Z ddlZddlmZmZ ddlmZ ddlmZ ddl	m
Z
 defdZdefd	Zdefd
ZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZdefdZ defdZ!defdZ"defd Z#defd!Z$defd"Z%defd#Z&defd$Z'defd%Z(defd&Z)defd'Z*defd(Z+defd)Z,defd*Z-defd+Z.defd,Z/defd-Z0defd.Z1defd/Z2defd0Z3defd1Z4defd2Z5defd3Z6defd4Z7defd5Z8defd6Z9defd7Z:defd8Z;defd9Z<defd:Z=defd;Z>defd<Z?defd=Z@defd>ZAdefd?ZBdefd@ZCdefdAZDdefdBZEdefdCZFdefdDZGdefdEZHdefdFZIdefdGZJdefdHZKdefdIZLdefdJZMdefdKZNdefdLZOdefdMZPdefdNZQdefdOZRdefdPZSdefdQZTdefdRZUdefdSZVdefdTZWdefdUZXdefdVZYdefdWZZdefdXZ[defdYZ\defdZZ]defd[Z^defd\Z_d]e`defd^Zag d_Zbdece`eg ede   f   f   fd`Zey)aa  
**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)LangChainDeprecationWarning)BaseLLM)is_interactive_envreturnc                      ddl m}  | S )Nr   AI21)langchain_community.llms.ai21r   r
   s    U/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/langchain/llms/__init__.py_import_ai21r      
    2K    c                      ddl m}  | S )Nr   
AlephAlpha)$langchain_community.llms.aleph_alphar   r   s    r   _import_aleph_alphar   $       ?r   c                      ddl m}  | S )Nr   AmazonAPIGateway)+langchain_community.llms.amazon_api_gatewayr   r   s    r   _import_amazon_api_gatewayr   *       Lr   c                      ddl m}  | S )Nr   	Anthropic)"langchain_community.llms.anthropicr   r   s    r   _import_anthropicr!   0       <r   c                      ddl m}  | S )Nr   Anyscale)!langchain_community.llms.anyscaler%   r$   s    r   _import_anyscaler'   6   
    :Or   c                      ddl m}  | S )Nr   Arcee)langchain_community.llms.arceer+   r*   s    r   _import_arceer-   <   
    4Lr   c                      ddl m}  | S )Nr   Aviary)langchain_community.llms.aviaryr1   r0   s    r   _import_aviaryr3   B   
    6Mr   c                      ddl m}  | S )Nr   AzureMLOnlineEndpoint))langchain_community.llms.azureml_endpointr7   r6   s    r   _import_azureml_endpointr9   H   s    O  r   c                      ddl m}  | S )Nr   QianfanLLMEndpoint)/langchain_community.llms.baidu_qianfan_endpointr<   r;   s    r   _import_baidu_qianfan_endpointr>   N   s    Rr   c                      ddl m}  | S )Nr   Banana)"langchain_community.llms.bananadevrA   r@   s    r   _import_bananadevrC   T   s
    9Mr   c                      ddl m}  | S )Nr   Baseten) langchain_community.llms.basetenrF   rE   s    r   _import_basetenrH   Z   
    8Nr   c                      ddl m}  | S )Nr   Beam)langchain_community.llms.beamrL   rK   s    r   _import_beamrN   `   r   r   c                      ddl m}  | S )Nr   Bedrock) langchain_community.llms.bedrockrQ   rP   s    r   _import_bedrockrS   f   rI   r   c                      ddl m}  | S )Nr   NIBittensorLLM)"langchain_community.llms.bittensorrV   rU   s    r   _import_bittensorrX   l   s    Ar   c                      ddl m}  | S )Nr   CerebriumAI)$langchain_community.llms.cerebriumair[   rZ   s    r   _import_cerebriumair]   r       @r   c                      ddl m}  | S )Nr   ChatGLM) langchain_community.llms.chatglmra   r`   s    r   _import_chatglmrc   x   rI   r   c                      ddl m}  | S )Nr   Clarifai)!langchain_community.llms.clarifairf   re   s    r   _import_clarifairh   ~   r(   r   c                      ddl m}  | S )Nr   Cohere)langchain_community.llms.cohererk   rj   s    r   _import_cohererm      r4   r   c                      ddl m}  | S )Nr   CTransformers)&langchain_community.llms.ctransformersrp   ro   s    r   _import_ctransformersrr          Dr   c                      ddl m}  | S )Nr   CTranslate2)$langchain_community.llms.ctranslate2rv   ru   s    r   _import_ctranslate2rx      r^   r   c                      ddl m}  | S )Nr   
Databricks)#langchain_community.llms.databricksr{   rz   s    r   _import_databricksr}          >r   c                      ddl m}  | S )Nr   ChatDatabricks)*langchain_community.chat_models.databricksr   r   s    r   _import_databricks_chatr      s    Ir   c                      ddl m}  | S )Nr   	DeepInfra)"langchain_community.llms.deepinfrar   r   s    r   _import_deepinfrar      r"   r   c                      ddl m}  | S )Nr   
DeepSparse)#langchain_community.llms.deepsparser   r   s    r   _import_deepsparser      r~   r   c                      ddl m}  | S )Nr   EdenAI)langchain_community.llms.edenair   r   s    r   _import_edenair      r4   r   c                      ddl m}  | S )Nr   FakeListLLM)langchain_core.language_modelsr   r   s    r   _import_faker      s    :r   c                      ddl m}  | S )Nr   	Fireworks)"langchain_community.llms.fireworksr   r   s    r   _import_fireworksr      r"   r   c                      ddl m}  | S )Nr   ForefrontAI)$langchain_community.llms.forefrontair   r   s    r   _import_forefrontair      r^   r   c                      ddl m}  | S )Nr   GigaChat)!langchain_community.llms.gigachatr   r   s    r   _import_gigachatr      r(   r   c                      ddl m}  | S )Nr   
GooglePalm)$langchain_community.llms.google_palmr   r   s    r   _import_google_palmr      r   r   c                      ddl m}  | S )Nr   GooseAI) langchain_community.llms.gooseair   r   s    r   _import_gooseair      rI   r   c                      ddl m}  | S )Nr   GPT4All) langchain_community.llms.gpt4allr   r   s    r   _import_gpt4allr      rI   r   c                      ddl m}  | S )Nr   GradientLLM)$langchain_community.llms.gradient_air   r   s    r   _import_gradient_air      r^   r   c                      ddl m}  | S )Nr   HuggingFaceEndpoint)-langchain_community.llms.huggingface_endpointr   r   s    r   _import_huggingface_endpointr          Qr   c                      ddl m}  | S )Nr   HuggingFaceHub)(langchain_community.llms.huggingface_hubr   r   s    r   _import_huggingface_hubr          Gr   c                      ddl m}  | S )Nr   HuggingFacePipeline)-langchain_community.llms.huggingface_pipeliner   r   s    r   _import_huggingface_pipeliner      r   r   c                      ddl m}  | S )Nr   HuggingFaceTextGenInference)7langchain_community.llms.huggingface_text_gen_inferencer   r   s    r   &_import_huggingface_text_gen_inferencer      s     '&r   c                      ddl m}  | S )Nr   HumanInputLLM)langchain_community.llms.humanr   r   s    r   _import_humanr      s    <r   c                      ddl m}  | S )Nr   JavelinAIGateway)+langchain_community.llms.javelin_ai_gatewayr   r   s    r   _import_javelin_ai_gatewayr     r   r   c                      ddl m}  | S )Nr   KoboldApiLLM)!langchain_community.llms.koboldair   r   s    r   _import_koboldair   
  s    >r   c                      ddl m}  | S )Nr   LlamaCpp)!langchain_community.llms.llamacppr   r   s    r   _import_llamacppr     r(   r   c                      ddl m}  | S )Nr   ManifestWrapper)!langchain_community.llms.manifestr   r   s    r   _import_manifestr     s    Ar   c                      ddl m}  | S )Nr   Minimax) langchain_community.llms.minimaxr   r   s    r   _import_minimaxr     rI   r   c                      ddl m}  | S )Nr   Mlflow)langchain_community.llms.mlflowr   r   s    r   _import_mlflowr   "  r4   r   c                      ddl m}  | S )Nr   
ChatMlflow)&langchain_community.chat_models.mlflowr   r   s    r   _import_mlflow_chatr   (  s    Ar   c                      ddl m}  | S )Nr   MlflowAIGateway)*langchain_community.llms.mlflow_ai_gatewayr   r   s    r   _import_mlflow_ai_gatewayr   .  s    Jr   c                      ddl m}  | S )Nr   Modal)langchain_community.llms.modalr   r   s    r   _import_modalr  4  r.   r   c                      ddl m}  | S )Nr   MosaicML)!langchain_community.llms.mosaicmlr  r  s    r   _import_mosaicmlr  :  r(   r   c                      ddl m}  | S )Nr   NLPCloud)!langchain_community.llms.nlpcloudr
  r	  s    r   _import_nlpcloudr  @  r(   r   c                      ddl m}  | S )Nr   OctoAIEndpoint)(langchain_community.llms.octoai_endpointr  r  s    r   _import_octoai_endpointr  F  r   r   c                      ddl m}  | S )Nr   Ollama)langchain_community.llms.ollamar  r  s    r   _import_ollamar  L  r4   r   c                      ddl m}  | S )Nr   OpaquePrompts)&langchain_community.llms.opaquepromptsr  r  s    r   _import_opaquepromptsr  R  rs   r   c                      ddl m}  | S )Nr   AzureOpenAI)langchain_community.llms.openair  r  s    r   _import_azure_openair   X  s    ;r   c                      ddl m}  | S )Nr   OpenAI)r  r#  r"  s    r   _import_openair$  ^  r4   r   c                      ddl m}  | S )Nr   
OpenAIChat)r  r'  r&  s    r   _import_openai_chatr(  d  s    :r   c                      ddl m}  | S )Nr   OpenLLM) langchain_community.llms.openllmr+  r*  s    r   _import_openllmr-  j  rI   r   c                      ddl m}  | S )Nr   OpenLM)langchain_community.llms.openlmr0  r/  s    r   _import_openlmr2  p  r4   r   c                      ddl m}  | S )Nr   PaiEasEndpoint))langchain_community.llms.pai_eas_endpointr5  r4  s    r   _import_pai_eas_endpointr7  v  s    Hr   c                      ddl m}  | S )Nr   Petals)langchain_community.llms.petalsr:  r9  s    r   _import_petalsr<  |  r4   r   c                      ddl m}  | S )Nr   
PipelineAI)#langchain_community.llms.pipelineair?  r>  s    r   _import_pipelineairA    r~   r   c                      ddl m}  | S )Nr   	Predibase)"langchain_community.llms.predibaserD  rC  s    r   _import_predibaserF    r"   r   c                      ddl m}  | S )Nr   PredictionGuard)(langchain_community.llms.predictionguardrI  rH  s    r   _import_predictionguardrK    s    Hr   c                      ddl m}  | S )Nr   PromptLayerOpenAI)+langchain_community.llms.promptlayer_openairN  rM  s    r   _import_promptlayerrP        Mr   c                      ddl m}  | S )Nr   PromptLayerOpenAIChat)rO  rT  rS  s    r   _import_promptlayer_chatrU    s    Q  r   c                      ddl m}  | S )Nr   	Replicate)"langchain_community.llms.replicaterX  rW  s    r   _import_replicaterZ    r"   r   c                      ddl m}  | S )Nr   RWKV)langchain_community.llms.rwkvr]  r\  s    r   _import_rwkvr_    r   r   c                      ddl m}  | S )Nr   SagemakerEndpoint)+langchain_community.llms.sagemaker_endpointrb  ra  s    r   _import_sagemaker_endpointrd    rQ  r   c                      ddl m}  | S )Nr   SelfHostedPipeline)$langchain_community.llms.self_hostedrg  rf  s    r   _import_self_hostedri    s    Gr   c                      ddl m}  | S )Nr   SelfHostedHuggingFaceLLM)1langchain_community.llms.self_hosted_hugging_facerl  rk  s    r    _import_self_hosted_hugging_facern    s     $#r   c                      ddl m}  | S )Nr   StochasticAI)%langchain_community.llms.stochasticairq  rp  s    r   _import_stochasticairs    s    Br   c                      ddl m}  | S )Nr   Nebula)'langchain_community.llms.symblai_nebularv  ru  s    r   _import_symblai_nebularx    s
    >Mr   c                      ddl m}  | S )Nr   TextGen) langchain_community.llms.textgenr{  rz  s    r   _import_textgenr}    rI   r   c                      ddl m}  | S Nr   TitanTakeoff&langchain_community.llms.titan_takeoffr  r  s    r   _import_titan_takeoffr        Cr   c                      ddl m}  | S r  r  r  s    r   _import_titan_takeoff_pror    r  r   c                      ddl m}  | S )Nr   Together)!langchain_community.llms.togetherr  r  s    r   _import_togetherr    r(   r   c                      ddl m}  | S )Nr   Tongyi)langchain_community.llms.tongyir  r  s    r   _import_tongyir    r4   r   c                      ddl m}  | S )Nr   VertexAI)!langchain_community.llms.vertexair  r  s    r   _import_vertexr    r(   r   c                      ddl m}  | S )Nr   VertexAIModelGarden)r  r  r  s    r   _import_vertex_model_gardenr    s    Er   c                      ddl m}  | S )Nr   VLLM)langchain_community.llms.vllmr  r  s    r   _import_vllmr    r   r   c                      ddl m}  | S )Nr   
VLLMOpenAI)r  r  r  s    r   _import_vllm_openair    s    8r   c                      ddl m}  | S )Nr   
WatsonxLLM)#langchain_community.llms.watsonxllmr  r  s    r   _import_watsonxllmr    r~   r   c                      ddl m}  | S )Nr   Writer)langchain_community.llms.writerr  r  s    r   _import_writerr    r4   r   c                      ddl m}  | S )Nr   
Xinference)#langchain_community.llms.xinferencer  r  s    r   _import_xinferencer    r~   r   c                      ddl m}  | S )Nr   	YandexGPT)langchain_community.llms.yandexr  r  s    r   _import_yandex_gptr    s    9r   c                      ddl m}  | S )Nr   VolcEngineMaasLLM)(langchain_community.llms.volcengine_maasr  r  s    r   _import_volcengine_maasr    s    Jr   namec                     ddl m} t               s t        j                  d|  ddt
               | dk(  r2t               j                         D ci c]  \  }}| |        }}}|S t        ||       S c c}}w )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`.   )
stacklevelcategorytype_to_cls_dict)	langchain_communityr  r   warningswarnr   get_type_to_cls_dictitemsgetattr)r  r  kvr  s        r   __getattr__r     s    ( 5 6:F ;WW
 0	
 !!  45;;=6
q!AqsF6
 6
  4	6
s   A4)Qr   r]  r  r   r   r   r%   r+   r1   r7   r  rA   rF   rL   rQ   rp   rv   r[   ra   rf   rk   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  rV   r
  rv  r  r  r  r#  r'  r+  r0  r5  r:  r?  rD  rI  rN  rT  r<   rX  rb  rl  rg  rq  r{  r  TitanTakeoffPror  r  r  r  r  r  r  r  r  c                  >   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t0        dt2        dt4        dt6        dt8        dt:        dt<        d t>        d!t@        d"tB        i d#tD        d$tF        d%tH        d&tJ        d'tL        d(tN        d)tP        d*tR        d+tT        d,tV        d-tX        d.tZ        d/t\        d0t^        d1t`        d2tb        d3td        i d4tf        d5th        d6tj        d7tl        d8tn        d9tp        d:tr        d;tt        d<tv        d=tx        d>tz        d?t|        d@t~        dAt        dBt        dCt        dDt        t        t        t        t        t        t        t        t        t        t        t        dE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_gptr  )Nr   r   r   rS   r!   r'   r-   r3   r   r9   rC   rH   rN   r]   rc   rh   rm   rr   rx   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  rx  rX   r  r  r$  r2  r7  r<  rA  rF  r  rZ  r_  rd  ri  rn  rs  r  r  r  r  r  r  r-  r  r  r  r  r  r   r>   r  r   r   r   r  r    s   PP*P 	8P 	/	P
 	&P 	$P 	P 	.P 	%P 	4P 	&P 	?P 	P 	*P 	OP  	$!P" 	.#P$ 	.%P& 	*'P( 	()P* 	2+P, 	&-P. 	(/P0 	.1P2 	\3P4 	*5P6 	+7P8 	*9P: 	?;P< 	'=P> 	??P@ 	 <APB 	2CPD 	 <EPF 	()OGPH 	}IPJ 	$KPL 	$MPN 	?OPP 	?QPR 	.SPT 	*UPV 	6WPX 	YPZ 	"[P\ 	(]P^ 	(_P` 	$aPb 	.cPd 	.ePf 	.gPh 	4iPj 	.kPl 	(mPn 	&oPp 	.qPr 	&sPt 	uPv 	8wPx 	*yPz 	#$D{P| 	,}P~ 	$P@ 	.APB 	.CPD 	6EPF 	NGPH 	 !<IPJ #)*( (8:(4_P Pr   )f__doc__r  typingr   r   langchain_core._apir   #langchain_core.language_models.llmsr   langchain._api.interactive_envr   r   r   r   r!   r'   r-   r3   r9   r>   rC   rH   rN   rS   rX   r]   rc   rh   rm   rr   rx   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-  r2  r7  r<  rA  rF  rK  rP  rU  rZ  r_  rd  ri  rn  rs  rx  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  strr  __all__dicttyper  r  r   r   <module>r      sY  (    ; 7 =c S C 3 # s  !# ! 3  c  3 S  #  s S C  3 C  c 3 S # S   S c  c ' 's C # # #   S 3 s # #   s c  S   #  C 3  S !# !3 c C S $# $c   s 3 #   S c S C  C C  c c 0RjQd3T']1B(C#CD Qr   