mirror of
https://github.com/open-webui/computer.git
synced 2026-11-22 21:50:43 -05:00
refac
This commit is contained in:
1 parent
9b15e89b02
commit
0a4166baa0
2 files changed
+5
-1
No files matched your search
@@ -2166,7 +2166,9 @@ async def run_chat_task(
|
||||
for idx in other_indices:
|
||||
tc, item = call_items[idx]
|
||||
if tc["name"] == "create_artifact":
|
||||
result = await create_artifact(**tc["arguments"], workspace=workspace)
|
||||
args = dict(tc["arguments"])
|
||||
args.pop("workspace", None)
|
||||
result = await create_artifact(**args, workspace=workspace)
|
||||
else:
|
||||
result = await execute_tool(
|
||||
tc["name"],
|
||||
|
||||
@@ -2923,6 +2923,8 @@ async def execute_tool(name: str, args: dict, __context__: dict) -> str:
|
||||
if not is_builtin_tool_enabled(name, __context__.get("builtin_tools")):
|
||||
return f"Error: tool disabled: {name}"
|
||||
fn = info["fn"]
|
||||
args = dict(args)
|
||||
args.pop("workspace", None)
|
||||
try:
|
||||
sig = inspect.signature(fn)
|
||||
if "__context__" in sig.parameters:
|
||||
|
||||
Reference in new issue
Block a user