Unverified Commit 5ff6b1da authored by kukuze's avatar kukuze Committed by GitHub

Windows local deployment switch "tool“ interface failed (#2483)

parent 8b49e0ee
...@@ -58,7 +58,7 @@ class BuiltinToolProviderController(ToolProviderController): ...@@ -58,7 +58,7 @@ class BuiltinToolProviderController(ToolProviderController):
tool_files = list(filter(lambda x: x.endswith(".yaml") and not x.startswith("__"), listdir(tool_path))) tool_files = list(filter(lambda x: x.endswith(".yaml") and not x.startswith("__"), listdir(tool_path)))
tools = [] tools = []
for tool_file in tool_files: for tool_file in tool_files:
with open(path.join(tool_path, tool_file)) as f: with open(path.join(tool_path, tool_file), encoding='utf-8') as f:
# get tool name # get tool name
tool_name = tool_file.split(".")[0] tool_name = tool_file.split(".")[0]
tool = load(f.read(), FullLoader) tool = load(f.read(), FullLoader)
...@@ -287,4 +287,4 @@ class BuiltinToolProviderController(ToolProviderController): ...@@ -287,4 +287,4 @@ class BuiltinToolProviderController(ToolProviderController):
:param tool_name: the name of the tool, defined in `get_tools` :param tool_name: the name of the tool, defined in `get_tools`
:param credentials: the credentials of the tool :param credentials: the credentials of the tool
""" """
pass pass
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment