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

XFEstudio/gpt4free

Updated provider (g4f/Provider/nexra/NexraGeminiPro.py)

7c51d2fa
kqlio67 <kqlio67@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -2
Modified g4f/Provider/nexra/NexraGeminiPro.py +2 -2
@@ -59,7 +59,7 @@ class NexraGeminiPro(AbstractProvider, ProviderModelMixin):
59 59 def process_non_streaming_response(cls, response):
60 60 if response.status_code == 200:
61 61 try:
62 content = response.text.lstrip('`')
62 content = response.text.lstrip('')
63 63 data = json.loads(content)
64 64 return data.get('message', '')
65 65 except json.JSONDecodeError:
@@ -73,7 +73,7 @@ class NexraGeminiPro(AbstractProvider, ProviderModelMixin):
73 73 for line in response.iter_lines(decode_unicode=True):
74 74 if line:
75 75 try:
76 line = line.lstrip('`')
76 line = line.lstrip('')
77 77 data = json.loads(line)
78 78 if data.get('finish'):
79 79 break