This commit is contained in:
Timothy J. Baek 2024-08-22 15:11:31 +02:00
parent 14187b027d
commit 3bf7d569c6

View File

@ -297,20 +297,19 @@ async def generate_function_chat_completion(form_data, user):
"name": user.name, "name": user.name,
"role": user.role, "role": user.role,
}, },
"__tools__": get_tools(
app,
tool_ids,
user,
{
**extra_params,
"__model__": app.state.MODELS[form_data["model"]],
"__messages__": form_data["messages"],
"__files__": files,
},
),
} }
extra_params["__tools__"] = get_tools(
app,
tool_ids,
user,
{
**extra_params,
"__model__": app.state.MODELS[form_data["model"]],
"__messages__": form_data["messages"],
"__files__": files,
},
)
if model_info: if model_info:
if model_info.base_model_id: if model_info.base_model_id:
form_data["model"] = model_info.base_model_id form_data["model"] = model_info.base_model_id