From 48cc9d388e3afbeb55b727b71a444f63c710a6b1 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 23 Jul 2026 03:39:56 -0400 Subject: [PATCH] refac --- backend/open_webui/functions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/functions.py b/backend/open_webui/functions.py index 6e82c0b022..1900ee752c 100644 --- a/backend/open_webui/functions.py +++ b/backend/open_webui/functions.py @@ -147,7 +147,10 @@ async def get_function_models(request): return pipe_models -async def generate_function_chat_completion(request, form_data, user, models: dict = {}): +async def generate_function_chat_completion(request, form_data, user, models: dict | None = None): + if models is None: + models = {} + async def execute_pipe(pipe, params): if inspect.iscoroutinefunction(pipe): return await pipe(**params)