返回提交历史
Modified
g4f/Provider/ChatGpt.py
+0
-1
Modified
g4f/Provider/DarkAI.py
+3
-3
XFEstudio/gpt4free
Update (g4f/Provider/ChatGpt.py g4f/Provider/DarkAI.py)
1a886923
代码差异
2 个文件
+3
-4
@@ -210,7 +210,6 @@ class ChatGpt(AbstractProvider, ProviderModelMixin):
210
210
for line in response.iter_lines():
211
211
if line:
212
212
decoded_line = line.decode()
213
print(decoded_line)
214
213
215
214
if decoded_line.startswith('data:'):
216
215
json_string = decoded_line[6:].strip()
@@ -75,9 +75,9 @@ class DarkAI(AsyncGeneratorProvider, ProviderModelMixin):
75
75
yield full_text.strip()
76
76
return
77
77
except json.JSONDecodeError:
78
print(f"Failed to decode JSON: {chunk_str}")
79
except Exception as e:
80
print(f"Error processing chunk: {e}")
78
pass
79
except Exception:
80
pass
81
81
82
82
if full_text:
83
83
yield full_text.strip()