fix: nonetype error

This commit is contained in:
Michael Poluektov 2024-08-19 11:15:22 +01:00
parent a933319adb
commit 528df12bf1

View File

@ -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)