summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/deprecated/FastGpt.py
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/Provider/deprecated/FastGpt.py')
-rw-r--r--g4f/Provider/deprecated/FastGpt.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/g4f/Provider/deprecated/FastGpt.py b/g4f/Provider/deprecated/FastGpt.py
index ef69e892..3af8c213 100644
--- a/g4f/Provider/deprecated/FastGpt.py
+++ b/g4f/Provider/deprecated/FastGpt.py
@@ -69,9 +69,11 @@ class FastGpt(BaseProvider):
try:
if b'content' in line:
line_json = json.loads(line.decode('utf-8').split('data: ')[1])
- if token := line_json['choices'][0]['delta'].get(
+ token = line_json['choices'][0]['delta'].get(
'content'
- ):
+ )
+
+ if token:
yield token
except:
continue \ No newline at end of file