format source code

这个提交包含在:
binary-husky
2024-01-13 18:00:52 +08:00
父节点 1714116a89
当前提交 7ab379688e
共有 12 个文件被更改,包括 1049 次插入595 次删除

查看文件

@@ -244,7 +244,7 @@ def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], system_promp
if has_choices and not choice_valid:
# 一些垃圾第三方接口的出现这样的错误
continue
if len(chunk_decoded) > 0 and (chunkjson is None):
if ('data: [DONE]' not in chunk_decoded) and len(chunk_decoded) > 0 and (chunkjson is None):
# 传递进来一些奇怪的东西
raise ValueError(f'无法读取以下数据,请检查配置。\n\n{chunk_decoded}')
# 前者是API2D的结束条件,后者是OPENAI的结束条件