mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-23 15:19:33 +00:00
community: llms
imports fixes (#18943)
Classes are missed in __all__ and in different places of __init__.py - BaichuanLLM - ChatDatabricks - ChatMlflow - Llamafile - Mlflow - Together Added classes to __all__. I also sorted __all__ list. --------- Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
parent
aee5138930
commit
7de1d9acfd
@ -162,6 +162,7 @@ def _import_databricks() -> Type[BaseLLM]:
|
|||||||
return Databricks
|
return Databricks
|
||||||
|
|
||||||
|
|
||||||
|
# deprecated / only for back compat - do not add to __all__
|
||||||
def _import_databricks_chat() -> Any:
|
def _import_databricks_chat() -> Any:
|
||||||
warn_deprecated(
|
warn_deprecated(
|
||||||
since="0.0.22",
|
since="0.0.22",
|
||||||
@ -325,6 +326,7 @@ def _import_mlflow() -> Type[BaseLLM]:
|
|||||||
return Mlflow
|
return Mlflow
|
||||||
|
|
||||||
|
|
||||||
|
# deprecated / only for back compat - do not add to __all__
|
||||||
def _import_mlflow_chat() -> Any:
|
def _import_mlflow_chat() -> Any:
|
||||||
warn_deprecated(
|
warn_deprecated(
|
||||||
since="0.0.22",
|
since="0.0.22",
|
||||||
@ -631,7 +633,7 @@ def __getattr__(name: str) -> Any:
|
|||||||
return _import_aviary()
|
return _import_aviary()
|
||||||
elif name == "AzureMLOnlineEndpoint":
|
elif name == "AzureMLOnlineEndpoint":
|
||||||
return _import_azureml_endpoint()
|
return _import_azureml_endpoint()
|
||||||
elif name == "Baichuan":
|
elif name == "BaichuanLLM" or name == "Baichuan":
|
||||||
return _import_baichuan()
|
return _import_baichuan()
|
||||||
elif name == "QianfanLLMEndpoint":
|
elif name == "QianfanLLMEndpoint":
|
||||||
return _import_baidu_qianfan_endpoint()
|
return _import_baidu_qianfan_endpoint()
|
||||||
@ -701,6 +703,8 @@ def __getattr__(name: str) -> Any:
|
|||||||
return _import_konko()
|
return _import_konko()
|
||||||
elif name == "LlamaCpp":
|
elif name == "LlamaCpp":
|
||||||
return _import_llamacpp()
|
return _import_llamacpp()
|
||||||
|
elif name == "Llamafile":
|
||||||
|
return _import_llamafile()
|
||||||
elif name == "ManifestWrapper":
|
elif name == "ManifestWrapper":
|
||||||
return _import_manifest()
|
return _import_manifest()
|
||||||
elif name == "Minimax":
|
elif name == "Minimax":
|
||||||
@ -818,6 +822,7 @@ __all__ = [
|
|||||||
"Aviary",
|
"Aviary",
|
||||||
"AzureMLOnlineEndpoint",
|
"AzureMLOnlineEndpoint",
|
||||||
"AzureOpenAI",
|
"AzureOpenAI",
|
||||||
|
"BaichuanLLM",
|
||||||
"Banana",
|
"Banana",
|
||||||
"Baseten",
|
"Baseten",
|
||||||
"Beam",
|
"Beam",
|
||||||
@ -836,8 +841,8 @@ __all__ = [
|
|||||||
"Fireworks",
|
"Fireworks",
|
||||||
"ForefrontAI",
|
"ForefrontAI",
|
||||||
"Friendli",
|
"Friendli",
|
||||||
"GigaChat",
|
|
||||||
"GPT4All",
|
"GPT4All",
|
||||||
|
"GigaChat",
|
||||||
"GooglePalm",
|
"GooglePalm",
|
||||||
"GooseAI",
|
"GooseAI",
|
||||||
"GradientLLM",
|
"GradientLLM",
|
||||||
@ -846,22 +851,26 @@ __all__ = [
|
|||||||
"HuggingFacePipeline",
|
"HuggingFacePipeline",
|
||||||
"HuggingFaceTextGenInference",
|
"HuggingFaceTextGenInference",
|
||||||
"HumanInputLLM",
|
"HumanInputLLM",
|
||||||
|
"JavelinAIGateway",
|
||||||
"KoboldApiLLM",
|
"KoboldApiLLM",
|
||||||
"Konko",
|
"Konko",
|
||||||
"LlamaCpp",
|
"LlamaCpp",
|
||||||
"TextGen",
|
"Llamafile",
|
||||||
"ManifestWrapper",
|
"ManifestWrapper",
|
||||||
"Minimax",
|
"Minimax",
|
||||||
|
"Mlflow",
|
||||||
"MlflowAIGateway",
|
"MlflowAIGateway",
|
||||||
"Modal",
|
"Modal",
|
||||||
"MosaicML",
|
"MosaicML",
|
||||||
"Nebula",
|
|
||||||
"NIBittensorLLM",
|
"NIBittensorLLM",
|
||||||
"NLPCloud",
|
"NLPCloud",
|
||||||
|
"Nebula",
|
||||||
|
"OCIGenAI",
|
||||||
"OCIModelDeploymentTGI",
|
"OCIModelDeploymentTGI",
|
||||||
"OCIModelDeploymentVLLM",
|
"OCIModelDeploymentVLLM",
|
||||||
"OCIGenAI",
|
"OctoAIEndpoint",
|
||||||
"Ollama",
|
"Ollama",
|
||||||
|
"OpaquePrompts",
|
||||||
"OpenAI",
|
"OpenAI",
|
||||||
"OpenAIChat",
|
"OpenAIChat",
|
||||||
"OpenLLM",
|
"OpenLLM",
|
||||||
@ -873,30 +882,29 @@ __all__ = [
|
|||||||
"PredictionGuard",
|
"PredictionGuard",
|
||||||
"PromptLayerOpenAI",
|
"PromptLayerOpenAI",
|
||||||
"PromptLayerOpenAIChat",
|
"PromptLayerOpenAIChat",
|
||||||
"OpaquePrompts",
|
"QianfanLLMEndpoint",
|
||||||
"RWKV",
|
"RWKV",
|
||||||
"Replicate",
|
"Replicate",
|
||||||
"SagemakerEndpoint",
|
"SagemakerEndpoint",
|
||||||
"SelfHostedHuggingFaceLLM",
|
"SelfHostedHuggingFaceLLM",
|
||||||
"SelfHostedPipeline",
|
"SelfHostedPipeline",
|
||||||
|
"SparkLLM",
|
||||||
"StochasticAI",
|
"StochasticAI",
|
||||||
|
"TextGen",
|
||||||
"TitanTakeoff",
|
"TitanTakeoff",
|
||||||
"TitanTakeoffPro",
|
"TitanTakeoffPro",
|
||||||
|
"Together",
|
||||||
"Tongyi",
|
"Tongyi",
|
||||||
"VertexAI",
|
|
||||||
"VertexAIModelGarden",
|
|
||||||
"VLLM",
|
"VLLM",
|
||||||
"VLLMOpenAI",
|
"VLLMOpenAI",
|
||||||
|
"VertexAI",
|
||||||
|
"VertexAIModelGarden",
|
||||||
|
"VolcEngineMaasLLM",
|
||||||
"WatsonxLLM",
|
"WatsonxLLM",
|
||||||
"Writer",
|
"Writer",
|
||||||
"OctoAIEndpoint",
|
|
||||||
"Xinference",
|
"Xinference",
|
||||||
"JavelinAIGateway",
|
|
||||||
"QianfanLLMEndpoint",
|
|
||||||
"YandexGPT",
|
"YandexGPT",
|
||||||
"Yuan2",
|
"Yuan2",
|
||||||
"VolcEngineMaasLLM",
|
|
||||||
"SparkLLM",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -912,6 +920,7 @@ def get_type_to_cls_dict() -> Dict[str, Callable[[], Type[BaseLLM]]]:
|
|||||||
"aviary": _import_aviary,
|
"aviary": _import_aviary,
|
||||||
"azure": _import_azure_openai,
|
"azure": _import_azure_openai,
|
||||||
"azureml_endpoint": _import_azureml_endpoint,
|
"azureml_endpoint": _import_azureml_endpoint,
|
||||||
|
"baichuan": _import_baichuan,
|
||||||
"bananadev": _import_bananadev,
|
"bananadev": _import_bananadev,
|
||||||
"baseten": _import_baseten,
|
"baseten": _import_baseten,
|
||||||
"beam": _import_beam,
|
"beam": _import_beam,
|
||||||
@ -922,7 +931,7 @@ def get_type_to_cls_dict() -> Dict[str, Callable[[], Type[BaseLLM]]]:
|
|||||||
"ctransformers": _import_ctransformers,
|
"ctransformers": _import_ctransformers,
|
||||||
"ctranslate2": _import_ctranslate2,
|
"ctranslate2": _import_ctranslate2,
|
||||||
"databricks": _import_databricks,
|
"databricks": _import_databricks,
|
||||||
"databricks-chat": _import_databricks_chat,
|
"databricks-chat": _import_databricks_chat, # deprecated / only for back compat
|
||||||
"deepinfra": _import_deepinfra,
|
"deepinfra": _import_deepinfra,
|
||||||
"deepsparse": _import_deepsparse,
|
"deepsparse": _import_deepsparse,
|
||||||
"edenai": _import_edenai,
|
"edenai": _import_edenai,
|
||||||
@ -942,10 +951,11 @@ def get_type_to_cls_dict() -> Dict[str, Callable[[], Type[BaseLLM]]]:
|
|||||||
"koboldai": _import_koboldai,
|
"koboldai": _import_koboldai,
|
||||||
"konko": _import_konko,
|
"konko": _import_konko,
|
||||||
"llamacpp": _import_llamacpp,
|
"llamacpp": _import_llamacpp,
|
||||||
|
"llamafile": _import_llamafile,
|
||||||
"textgen": _import_textgen,
|
"textgen": _import_textgen,
|
||||||
"minimax": _import_minimax,
|
"minimax": _import_minimax,
|
||||||
"mlflow": _import_mlflow,
|
"mlflow": _import_mlflow,
|
||||||
"mlflow-chat": _import_mlflow_chat,
|
"mlflow-chat": _import_mlflow_chat, # deprecated / only for back compat
|
||||||
"mlflow-ai-gateway": _import_mlflow_ai_gateway,
|
"mlflow-ai-gateway": _import_mlflow_ai_gateway,
|
||||||
"modal": _import_modal,
|
"modal": _import_modal,
|
||||||
"mosaic": _import_mosaicml,
|
"mosaic": _import_mosaicml,
|
||||||
|
@ -13,6 +13,7 @@ EXPECT_ALL = [
|
|||||||
"Aviary",
|
"Aviary",
|
||||||
"AzureMLOnlineEndpoint",
|
"AzureMLOnlineEndpoint",
|
||||||
"AzureOpenAI",
|
"AzureOpenAI",
|
||||||
|
"BaichuanLLM",
|
||||||
"Banana",
|
"Banana",
|
||||||
"Baseten",
|
"Baseten",
|
||||||
"Beam",
|
"Beam",
|
||||||
@ -44,9 +45,11 @@ EXPECT_ALL = [
|
|||||||
"KoboldApiLLM",
|
"KoboldApiLLM",
|
||||||
"Konko",
|
"Konko",
|
||||||
"LlamaCpp",
|
"LlamaCpp",
|
||||||
|
"Llamafile",
|
||||||
"TextGen",
|
"TextGen",
|
||||||
"ManifestWrapper",
|
"ManifestWrapper",
|
||||||
"Minimax",
|
"Minimax",
|
||||||
|
"Mlflow",
|
||||||
"MlflowAIGateway",
|
"MlflowAIGateway",
|
||||||
"Modal",
|
"Modal",
|
||||||
"MosaicML",
|
"MosaicML",
|
||||||
@ -77,6 +80,7 @@ EXPECT_ALL = [
|
|||||||
"StochasticAI",
|
"StochasticAI",
|
||||||
"TitanTakeoff",
|
"TitanTakeoff",
|
||||||
"TitanTakeoffPro",
|
"TitanTakeoffPro",
|
||||||
|
"Together",
|
||||||
"Tongyi",
|
"Tongyi",
|
||||||
"VertexAI",
|
"VertexAI",
|
||||||
"VertexAIModelGarden",
|
"VertexAIModelGarden",
|
||||||
|
Loading…
Reference in New Issue
Block a user