From 92a88df4840fafcd455af50b1e2d3b270d694bbc Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 4 Sep 2024 20:00:47 +0200 Subject: [PATCH] refac --- backend/open_webui/apps/webui/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/apps/webui/utils.py b/backend/open_webui/apps/webui/utils.py index e63fc8b26..bdcd05bb3 100644 --- a/backend/open_webui/apps/webui/utils.py +++ b/backend/open_webui/apps/webui/utils.py @@ -79,7 +79,7 @@ def load_toolkit_module_by_id(toolkit_id, content=None): content = replace_imports(content) Tools.update_tool_by_id(toolkit_id, {"content": content}) - module_name = f"{toolkit_id}" + module_name = f"tool_{toolkit_id}" module = types.ModuleType(module_name) sys.modules[module_name] = module @@ -117,7 +117,7 @@ def load_function_module_by_id(function_id, content=None): content = replace_imports(content) Functions.update_function_by_id(function_id, {"content": content}) - module_name = f"{function_id}" + module_name = f"function_{function_id}" module = types.ModuleType(module_name) sys.modules[module_name] = module