mirror of
https://github.com/open-webui/open-webui
synced 2024-11-07 00:59:52 +00:00
fix: nonetype error
This commit is contained in:
parent
a933319adb
commit
528df12bf1
@ -996,8 +996,8 @@ async def generate_chat_completions(form_data: dict, user=Depends(get_verified_u
|
|||||||
detail="Model not found",
|
detail="Model not found",
|
||||||
)
|
)
|
||||||
model = app.state.MODELS[model_id]
|
model = app.state.MODELS[model_id]
|
||||||
files = form_data.pop("files", None)
|
files = form_data.pop("files", [])
|
||||||
tool_ids = form_data.pop("tool_ids", None)
|
tool_ids = form_data.pop("tool_ids", [])
|
||||||
|
|
||||||
if model.get("pipe"):
|
if model.get("pipe"):
|
||||||
return await generate_function_chat_completion(form_data, user, files, tool_ids)
|
return await generate_function_chat_completion(form_data, user, files, tool_ids)
|
||||||
|
Loading…
Reference in New Issue
Block a user