mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 08:40:58 +00:00
fix
This commit is contained in:
parent
3afd66d50f
commit
d6fc0ccf65
@ -54,8 +54,7 @@ def load_toolkit_module_by_id(toolkit_id):
|
|||||||
|
|
||||||
if not os.path.exists(toolkit_path):
|
if not os.path.exists(toolkit_path):
|
||||||
tool = Tools.get_tool_by_id(toolkit_id)
|
tool = Tools.get_tool_by_id(toolkit_id)
|
||||||
|
if tool:
|
||||||
if tool and not os.path.exists(f"{toolkit_path}.error"):
|
|
||||||
with open(toolkit_path, "w") as file:
|
with open(toolkit_path, "w") as file:
|
||||||
content = tool.content
|
content = tool.content
|
||||||
content = content.replace("from utils", "from open_webui.utils")
|
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):
|
if not os.path.exists(function_path):
|
||||||
function = Functions.get_function_by_id(function_id)
|
function = Functions.get_function_by_id(function_id)
|
||||||
|
if function:
|
||||||
if function and not os.path.exists(f"{function_path}.error"):
|
|
||||||
with open(function_path, "w") as file:
|
with open(function_path, "w") as file:
|
||||||
content = function.content
|
content = function.content
|
||||||
content = content.replace("from utils", "from open_webui.utils")
|
content = content.replace("from utils", "from open_webui.utils")
|
||||||
|
Loading…
Reference in New Issue
Block a user