Skip to content

Commit

Permalink
langchain: Import from langchain_core in langchain.smith to avoid dep…
Browse files Browse the repository at this point in the history
…recation warning (langchain-ai#18129)

Avoids deprecation warning that triggered at import time, e.g. with
`python -c 'import langchain.smith'`


/opt/venv/lib/python3.12/site-packages/langchain/callbacks/__init__.py:37:
LangChainDeprecationWarning: Importing this callback from langchain is
deprecated. Importing it from langchain will no longer be supported as
of langchain==0.2.0. Please import from langchain-community instead:

    `from langchain_community.callbacks import base`.

To install langchain-community run `pip install -U langchain-community`.
  • Loading branch information
simonschmidt authored and Hayden Wolff committed Feb 27, 2024
1 parent b7ed9c8 commit 71a3974
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/langchain/langchain/smith/evaluation/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
from typing import Any, Dict, Optional, Sequence
from uuid import UUID

from langchain_core.callbacks import base as base_callbacks
from langchain_core.documents import Document
from langchain_core.outputs import LLMResult

from langchain.callbacks import base as base_callbacks


class ProgressBarCallback(base_callbacks.BaseCallbackHandler):
"""A simple progress bar for the console."""
Expand Down

0 comments on commit 71a3974

Please sign in to comment.