fix: improvement to tools dict name
This commit is contained in:
parent
f90eedf5b5
commit
5b277913cf
2 changed files with 4 additions and 4 deletions
|
|
@ -4,8 +4,8 @@ from langflow.interface.custom.types import PythonFunction
|
||||||
from langchain.tools.json.tool import JsonSpec
|
from langchain.tools.json.tool import JsonSpec
|
||||||
|
|
||||||
|
|
||||||
OTHER_TOOLS = {"JsonSpec": JsonSpec}
|
FILE_TOOLS = {"JsonSpec": JsonSpec}
|
||||||
CUSTOM_TOOLS = {"Tool": Tool, "PythonFunction": PythonFunction}
|
CUSTOM_TOOLS = {"Tool": Tool, "PythonFunction": PythonFunction}
|
||||||
ALL_TOOLS_NAMES = set(
|
ALL_TOOLS_NAMES = set(
|
||||||
get_all_tool_names() + list(CUSTOM_TOOLS.keys()) + list(OTHER_TOOLS.keys())
|
get_all_tool_names() + list(CUSTOM_TOOLS.keys()) + list(FILE_TOOLS.keys())
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ from langchain.agents.load_tools import (
|
||||||
_LLM_TOOLS,
|
_LLM_TOOLS,
|
||||||
)
|
)
|
||||||
from langchain.agents.tools import Tool
|
from langchain.agents.tools import Tool
|
||||||
from langflow.interface.tools.constants import CUSTOM_TOOLS, OTHER_TOOLS
|
from langflow.interface.tools.constants import CUSTOM_TOOLS, FILE_TOOLS
|
||||||
|
|
||||||
|
|
||||||
def get_tools_dict():
|
def get_tools_dict():
|
||||||
|
|
@ -20,7 +20,7 @@ def get_tools_dict():
|
||||||
**{k: v[0] for k, v in _EXTRA_LLM_TOOLS.items()},
|
**{k: v[0] for k, v in _EXTRA_LLM_TOOLS.items()},
|
||||||
**{k: v[0] for k, v in _EXTRA_OPTIONAL_TOOLS.items()},
|
**{k: v[0] for k, v in _EXTRA_OPTIONAL_TOOLS.items()},
|
||||||
**CUSTOM_TOOLS,
|
**CUSTOM_TOOLS,
|
||||||
**OTHER_TOOLS,
|
**FILE_TOOLS,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue