From b4f1ea6013389a0c8fc9685120e9926f0f5999ff Mon Sep 17 00:00:00 2001 From: Samuel Date: Fri, 1 Nov 2024 06:09:41 +0000 Subject: [PATCH] fix ollama logic --- backend/open_webui/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 8e409a5eb..fe47c42f8 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -574,6 +574,7 @@ async def handle_nonstreaming_response(request: Request, response: Response, response_dict = json.loads(content) body = json.loads(request._body) + is_ollama = False if app.state.MODELS[body["model"]]["owned_by"] == "ollama": is_ollama = True is_openai = not is_ollama