From 5ff6b1da07c226a98819bd311299722c38552c87 Mon Sep 17 00:00:00 2001 From: kukuze <67894866+kukuze@users.noreply.github.com> Date: Mon, 19 Feb 2024 12:03:20 +0000 Subject: [PATCH] =?UTF-8?q?Windows=20local=20deployment=20switch=20"tool?= =?UTF-8?q?=E2=80=9C=20interface=20failed=20(#2483)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/core/tools/provider/builtin_tool_provider.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/tools/provider/builtin_tool_provider.py b/api/core/tools/provider/builtin_tool_provider.py index 0dc29b8a04..93e7d5a39e 100644 --- a/api/core/tools/provider/builtin_tool_provider.py +++ b/api/core/tools/provider/builtin_tool_provider.py @@ -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 \ No newline at end of file + pass