Merge pull request #4847 from michaelpoluektov/fix-tools-param

fix: `__tools__` param
This commit is contained in:
Timothy Jaeryang Baek 2024-08-23 14:08:32 +02:00 committed by GitHub
commit f5c0e670aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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: