Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
baskaryan committed Jan 3, 2024
1 parent fee13a0 commit c58a915
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libs/langchain/langchain/chat_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ def __getattr__(name: str) -> None:
# If not in interactive env, raise warning.
if not hasattr(sys, "ps2"):
warnings.warn(
"Importing chat models from langchain is no longer supported. "
"Please import from langchain-community like so:\n\n"
f"`from langchain_community.chat_models import {name}`.",
"Importing chat models from langchain is deprecated. Importing from "
"langchain will no longer be supported as of langchain==0.2.0. "
"Please import from langchain-community instead:\n\n"
f"`from langchain_community.chat_models import {name}`.\n\n"
"To install langchain-community run `pip install -U langchain-community`.",
category=LangChainDeprecationWarning,
)

Expand Down

0 comments on commit c58a915

Please sign in to comment.