XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Update (g4f/Provider/ChatGpt.py g4f/Provider/DarkAI.py)

1a886923
kqlio67 <kqlio67@users.noreply.github.com>
提交于

代码差异

2 个文件 +3 -4
Modified g4f/Provider/ChatGpt.py +0 -1
@@ -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()
Modified g4f/Provider/DarkAI.py +3 -3
@@ -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()