From ad78589843d183d71b752068a033e1588c1b9e81 Mon Sep 17 00:00:00 2001 From: H Lohaus Date: Mon, 20 Nov 2023 17:34:21 +0100 Subject: Update GptGo.py --- g4f/Provider/GptGo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'g4f/Provider') 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 -- cgit v1.2.3