Fix import path in constants.py

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-01-09 10:17:27 -03:00
commit 6ffb7cc233

View file

@ -2,6 +2,7 @@ from langchain import tools
from langchain.agents import Tool
from langchain.agents.load_tools import _BASE_TOOLS, _EXTRA_LLM_TOOLS, _EXTRA_OPTIONAL_TOOLS, _LLM_TOOLS
from langchain.tools.json.tool import JsonSpec
from langflow.interface.importing.utils import import_class
from langflow.interface.tools.custom import PythonFunction, PythonFunctionTool
@ -12,7 +13,7 @@ CUSTOM_TOOLS = {
"PythonFunction": PythonFunction,
}
OTHER_TOOLS = {tool: import_class(f"langchain_community.tools.{tool}") for tool in tools.__all__}
OTHER_TOOLS = {tool: import_class(f"langchain.tools.{tool}") for tool in tools.__all__}
ALL_TOOLS_NAMES = {
**_BASE_TOOLS,