XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Fix: GptGo json.decoder.JSONDecodeError

19346ba9
hs_junxiang <jimmy871117@gmail.com>
提交于

代码差异

1 个文件 +2 -0
Modified g4f/Provider/GptGo.py +2 -0
@@ -60,6 +60,8 @@ class GptGo(AsyncGeneratorProvider):
60 60 if line.startswith("data: [DONE]"):
61 61 break
62 62 line = json.loads(line[len(start):-1])
63 if line["choices"][0]["finish_reason"] == "stop":
64 break
63 65 content = line["choices"][0]["delta"].get("content")
64 66 if content:
65 67 yield content