Skip to content

Commit

Permalink
fix: suppress LangChainDeprecationWarning messages
Browse files Browse the repository at this point in the history
  • Loading branch information
italojohnny committed Oct 30, 2024
1 parent cfe6ce4 commit f01d2ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
from .aiml import AIMLEmbeddingsImpl
import warnings

from langchain_core._api.deprecation import LangChainDeprecationWarning

with warnings.catch_warnings():
warnings.simplefilter("ignore", LangChainDeprecationWarning)
from .aiml import AIMLEmbeddingsImpl


__all__ = ["AIMLEmbeddingsImpl"]
11 changes: 9 additions & 2 deletions src/backend/base/langflow/components/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from .astradb import AstraDBToolComponent
from .astradb_cql import AstraDBCQLToolComponent
import warnings

from langchain_core._api.deprecation import LangChainDeprecationWarning

from .bing_search_api import BingSearchAPIComponent
from .calculator import CalculatorToolComponent
from .duck_duck_go_search_run import DuckDuckGoSearchComponent
Expand All @@ -17,6 +19,11 @@
from .wolfram_alpha_api import WolframAlphaAPIComponent
from .yahoo_finance import YfinanceToolComponent

with warnings.catch_warnings():
warnings.simplefilter("ignore", LangChainDeprecationWarning)
from .astradb import AstraDBToolComponent
from .astradb_cql import AstraDBCQLToolComponent

__all__ = [
"AstraDBCQLToolComponent",
"AstraDBToolComponent",
Expand Down

0 comments on commit f01d2ac

Please sign in to comment.