From f9d5038e598d403ca1469537b2afcf180e0dbba8 Mon Sep 17 00:00:00 2001 From: liunux4odoo Date: Wed, 16 Aug 2023 09:33:55 +0800 Subject: [PATCH] fix webui utils: remove unneeded error check --- webui_pages/utils.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/webui_pages/utils.py b/webui_pages/utils.py index c721e97..b1d5c28 100644 --- a/webui_pages/utils.py +++ b/webui_pages/utils.py @@ -223,11 +223,6 @@ class ApiRequest: try: with response as r: for chunk in r.iter_text(None): - if not chunk: # openai api server communicating error - msg = f"API通信超时,请确认已启动FastChat与API服务(详见README '5. 启动 API 服务或 Web UI')" - logger.error(msg) - yield {"code": 500, "errorMsg": msg} - break if as_json and chunk: yield json.loads(chunk) elif chunk.strip():