Browse Source

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

tags/0.5.7
kukuze 1 year ago
parent
commit
5ff6b1da07
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      api/core/tools/provider/builtin_tool_provider.py

+ 2
- 2
api/core/tools/provider/builtin_tool_provider.py View File

@@ -58,7 +58,7 @@ class BuiltinToolProviderController(ToolProviderController):
tool_files = list(filter(lambda x: x.endswith(".yaml") and not x.startswith("__"), listdir(tool_path)))
tools = []
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
tool_name = tool_file.split(".")[0]
tool = load(f.read(), FullLoader)
@@ -287,4 +287,4 @@ class BuiltinToolProviderController(ToolProviderController):
:param tool_name: the name of the tool, defined in `get_tools`
:param credentials: the credentials of the tool
"""
pass
pass

Loading…
Cancel
Save