mirror of
https://github.com/open-webui/open-webui
synced 2024-11-24 21:13:59 +00:00
Merge pull request #4847 from michaelpoluektov/fix-tools-param
fix: `__tools__` param
This commit is contained in:
commit
f5c0e670aa
@ -302,18 +302,16 @@ async def generate_function_chat_completion(form_data, user):
|
|||||||
"role": user.role,
|
"role": user.role,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
extra_params["__tools__"] = (
|
extra_params["__tools__"] = get_tools(
|
||||||
get_tools(
|
app,
|
||||||
app,
|
tool_ids,
|
||||||
tool_ids,
|
user,
|
||||||
user,
|
{
|
||||||
{
|
**extra_params,
|
||||||
**extra_params,
|
"__model__": app.state.MODELS[form_data["model"]],
|
||||||
"__model__": app.state.MODELS[form_data["model"]],
|
"__messages__": form_data["messages"],
|
||||||
"__messages__": form_data["messages"],
|
"__files__": files,
|
||||||
"__files__": files,
|
},
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if model_info:
|
if model_info:
|
||||||
|
Loading…
Reference in New Issue
Block a user