历史上的今天,带图片

这个提交包含在:
Your Name
2023-03-29 12:21:47 +08:00
父节点 ebf365841e
当前提交 2bedba2e17
共有 2 个文件被更改,包括 5 次插入4 次删除

查看文件

@@ -83,7 +83,8 @@ def predict_no_ui_long_connection(inputs, top_p, temperature, history=[], sys_pr
except StopIteration: break
if len(chunk)==0: continue
if not chunk.startswith('data:'):
raise ConnectionAbortedError("OpenAI返回了错误:" + chunk)
chunk = get_full_error(chunk.encode('utf8'), stream_response)
raise ConnectionAbortedError("OpenAI拒绝了请求:" + chunk.decode())
delta = json.loads(chunk.lstrip('data:'))['choices'][0]["delta"]
if len(delta) == 0: break
if "role" in delta: continue