langchain: Import from langchain_core in langchain.smith to avoid deprecation warning (#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`.
pull/18135/head
Simon Schmidt 4 months ago committed by GitHub
parent 9147a437f1
commit 2716d58603
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -4,11 +4,10 @@ import threading
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."""

Loading…
Cancel
Save