mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-05 11:07:55 -05:00
refac
This commit is contained in:
1 parent
9f42251b32
commit
3f4fefdb00
1 file changed
+5
-1
@@ -276,7 +276,11 @@ async def load_tool_module_by_id(tool_id, content=None):
|
||||
if engine == 'monty':
|
||||
from open_webui.utils.tool_sandbox import load_sandboxed_tool
|
||||
|
||||
return await load_sandboxed_tool(tool_id, content)
|
||||
try:
|
||||
return await load_sandboxed_tool(tool_id, content)
|
||||
except Exception as e:
|
||||
log.error(f'Error loading module: {tool_id}: {e}')
|
||||
raise
|
||||
# With the sandbox on, an unknown or empty engine must not fall back to exec.
|
||||
if engine is not None:
|
||||
raise RuntimeError(f'Unknown tool sandbox engine: {engine!r}')
|
||||
|
||||
Reference in new issue
Block a user