From d6fc0ccf659afc06f289b4480964c46a223c981d Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 4 Sep 2024 19:03:51 +0200 Subject: [PATCH] fix --- backend/open_webui/apps/webui/utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/open_webui/apps/webui/utils.py b/backend/open_webui/apps/webui/utils.py index a5ccad831..20417a0cb 100644 --- a/backend/open_webui/apps/webui/utils.py +++ b/backend/open_webui/apps/webui/utils.py @@ -54,8 +54,7 @@ def load_toolkit_module_by_id(toolkit_id): if not os.path.exists(toolkit_path): tool = Tools.get_tool_by_id(toolkit_id) - - if tool and not os.path.exists(f"{toolkit_path}.error"): + if tool: with open(toolkit_path, "w") as file: content = tool.content content = content.replace("from utils", "from open_webui.utils") @@ -95,8 +94,7 @@ def load_function_module_by_id(function_id): if not os.path.exists(function_path): function = Functions.get_function_by_id(function_id) - - if function and not os.path.exists(f"{function_path}.error"): + if function: with open(function_path, "w") as file: content = function.content content = content.replace("from utils", "from open_webui.utils")