fix: tools param

This commit is contained in:
Michael Poluektov 2024-08-23 12:58:43 +01:00
parent 5d8dbff486
commit 83de28bac2

View File

@ -302,18 +302,16 @@ async def generate_function_chat_completion(form_data, user):
"role": user.role,
},
}
extra_params["__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: