fix webui utils: remove unneeded error check

This commit is contained in:
liunux4odoo 2023-08-16 09:33:55 +08:00
parent b40beac1a8
commit f9d5038e59
1 changed files with 0 additions and 5 deletions

View File

@ -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():