diff --git a/backend/open_webui/utils/chat.py b/backend/open_webui/utils/chat.py index 74d0af4f7..e538f761e 100644 --- a/backend/open_webui/utils/chat.py +++ b/backend/open_webui/utils/chat.py @@ -149,7 +149,7 @@ async def generate_direct_chat_completion( } ) - if "error" in res: + if "error" in res and res["error"]: raise Exception(res["error"]) return res