Skip to content

Commit

Permalink
chat models in llms?
Browse files Browse the repository at this point in the history
  • Loading branch information
efriis committed Feb 23, 2024
1 parent 31ea1b8 commit 8af65db
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions libs/community/langchain_community/llms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
CallbackManager, AsyncCallbackManager,
AIMessage, BaseMessage
""" # noqa: E501

from typing import Any, Callable, Dict, Type

from langchain_core._api.deprecation import warn_deprecated
from langchain_core.language_models.llms import BaseLLM


Expand Down Expand Up @@ -160,7 +162,12 @@ def _import_databricks() -> Type[BaseLLM]:
return Databricks


def _import_databricks_chat() -> Type[BaseLLM]:
def _import_databricks_chat() -> Any:
warn_deprecated(
since="0.0.22",
removal="0.2",
alternative_import="langchain_community.chat_models.ChatDatabricks",
)
from langchain_community.chat_models.databricks import ChatDatabricks

return ChatDatabricks
Expand Down Expand Up @@ -306,7 +313,12 @@ def _import_mlflow() -> Type[BaseLLM]:
return Mlflow


def _import_mlflow_chat() -> Type[BaseLLM]:
def _import_mlflow_chat() -> Any:
warn_deprecated(
since="0.0.22",
removal="0.2",
alternative_import="langchain_community.chat_models.ChatMlflow",
)
from langchain_community.chat_models.mlflow import ChatMlflow

return ChatMlflow
Expand Down

0 comments on commit 8af65db

Please sign in to comment.