浏览代码

fix: allow error returns None

MeteorSky 2 月之前
父节点
当前提交
a01ef6cfa0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      backend/open_webui/utils/chat.py

+ 1 - 1
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