From a3089e0472d4d8695849fdb68105e9c4c8ed85cc Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 22 Aug 2024 15:24:48 +0200 Subject: [PATCH] fix --- backend/apps/webui/main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/apps/webui/main.py b/backend/apps/webui/main.py index 4b3fbad68..40f264860 100644 --- a/backend/apps/webui/main.py +++ b/backend/apps/webui/main.py @@ -301,7 +301,9 @@ async def generate_function_chat_completion(form_data, user): "name": user.name, "role": user.role, }, - "__tools__": get_tools( + } + extra_params["__tools__"] = ( + get_tools( app, tool_ids, user, @@ -312,9 +314,8 @@ async def generate_function_chat_completion(form_data, user): "__files__": files, }, ), - } - - + ) + if model_info: if model_info.base_model_id: form_data["model"] = model_info.base_model_id