From 83de28bac27052a2cd40d0d48a444794badbe18a Mon Sep 17 00:00:00 2001 From: Michael Poluektov Date: Fri, 23 Aug 2024 12:58:43 +0100 Subject: [PATCH] fix: tools param --- backend/apps/webui/main.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/backend/apps/webui/main.py b/backend/apps/webui/main.py index 40f264860..54e7132f3 100644 --- a/backend/apps/webui/main.py +++ b/backend/apps/webui/main.py @@ -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: