diff options
author | hs_junxiang <jimmy871117@gmail.com> | 2023-10-12 04:53:30 +0200 |
---|---|---|
committer | hs_junxiang <jimmy871117@gmail.com> | 2023-10-12 04:53:30 +0200 |
commit | 19346ba9bae9d4c63acc41b36d198a6b50246e29 (patch) | |
tree | b4d580ee038ede0eb0b578ef2d9e7bebb4bd3a44 /g4f | |
parent | ~ (diff) | |
download | gpt4free-19346ba9bae9d4c63acc41b36d198a6b50246e29.tar gpt4free-19346ba9bae9d4c63acc41b36d198a6b50246e29.tar.gz gpt4free-19346ba9bae9d4c63acc41b36d198a6b50246e29.tar.bz2 gpt4free-19346ba9bae9d4c63acc41b36d198a6b50246e29.tar.lz gpt4free-19346ba9bae9d4c63acc41b36d198a6b50246e29.tar.xz gpt4free-19346ba9bae9d4c63acc41b36d198a6b50246e29.tar.zst gpt4free-19346ba9bae9d4c63acc41b36d198a6b50246e29.zip |
Diffstat (limited to 'g4f')
-rw-r--r-- | g4f/Provider/GptGo.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/g4f/Provider/GptGo.py b/g4f/Provider/GptGo.py index f9b94a5c..255c0ca9 100644 --- a/g4f/Provider/GptGo.py +++ b/g4f/Provider/GptGo.py @@ -60,6 +60,8 @@ class GptGo(AsyncGeneratorProvider): if line.startswith("data: [DONE]"): break line = json.loads(line[len(start):-1]) + if line["choices"][0]["finish_reason"] == "stop": + break content = line["choices"][0]["delta"].get("content") if content: yield content |