diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2023-11-20 17:34:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-20 17:34:21 +0100 |
commit | ad78589843d183d71b752068a033e1588c1b9e81 (patch) | |
tree | ee613713531802bf7eb11f63ec2cc45828d98b11 /g4f/Provider | |
parent | Set min version for curl_cffi (diff) | |
download | gpt4free-ad78589843d183d71b752068a033e1588c1b9e81.tar gpt4free-ad78589843d183d71b752068a033e1588c1b9e81.tar.gz gpt4free-ad78589843d183d71b752068a033e1588c1b9e81.tar.bz2 gpt4free-ad78589843d183d71b752068a033e1588c1b9e81.tar.lz gpt4free-ad78589843d183d71b752068a033e1588c1b9e81.tar.xz gpt4free-ad78589843d183d71b752068a033e1588c1b9e81.tar.zst gpt4free-ad78589843d183d71b752068a033e1588c1b9e81.zip |
Diffstat (limited to 'g4f/Provider')
-rw-r--r-- | g4f/Provider/GptGo.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/g4f/Provider/GptGo.py b/g4f/Provider/GptGo.py index be9979f2..442aa90d 100644 --- a/g4f/Provider/GptGo.py +++ b/g4f/Provider/GptGo.py @@ -62,5 +62,6 @@ class GptGo(AsyncGeneratorProvider): line = json.loads(line[len(start):-1]) if line["choices"][0]["finish_reason"] == "stop": break - if content := line["choices"][0]["delta"].get("content"): - yield content
\ No newline at end of file + content = line["choices"][0]["delta"].get("content") + if content: + yield content |