mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-07 15:38:27 +08:00
Merge branch 'dev' of github.com:chatchat-space/Langchain-Chatchat into dev
This commit is contained in:
commit
17278922dc
@ -223,11 +223,6 @@ class ApiRequest:
|
|||||||
try:
|
try:
|
||||||
with response as r:
|
with response as r:
|
||||||
for chunk in r.iter_text(None):
|
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:
|
if as_json and chunk:
|
||||||
yield json.loads(chunk)
|
yield json.loads(chunk)
|
||||||
elif chunk.strip():
|
elif chunk.strip():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user