mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-14 04:08:46 +00:00
Merge 1e3563e05b into ed8c744e77
This commit is contained in:
commit
39306e85d6
2 changed files with 3 additions and 3 deletions
|
|
@ -225,7 +225,7 @@ async def generate_function_chat_completion(request, form_data, user, models: di
|
|||
|
||||
metadata = form_data.pop('metadata', {})
|
||||
|
||||
files = metadata.get('files', [])
|
||||
files = metadata.get('files') or []
|
||||
tool_ids = metadata.get('tool_ids', [])
|
||||
# Check if tool_ids is None
|
||||
if tool_ids is None:
|
||||
|
|
|
|||
|
|
@ -3117,7 +3117,7 @@ async def process_chat_payload(request, form_data, user, metadata, model):
|
|||
**extra_params,
|
||||
'__model__': models[task_model_id],
|
||||
'__messages__': form_data['messages'],
|
||||
'__files__': metadata.get('files', []),
|
||||
'__files__': metadata.get('files') or [],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -3507,7 +3507,7 @@ async def execute_tool_call(form_data, metadata, event_caller, tool_call):
|
|||
function=tool['callable'],
|
||||
extra_params={
|
||||
'__messages__': form_data.get('messages', []),
|
||||
'__files__': metadata.get('files', []),
|
||||
'__files__': metadata.get('files') or [],
|
||||
},
|
||||
)
|
||||
result = await function(**params)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue