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

XFEstudio/gpt4free

Fix response handling in Gemini: update TitleGeneration condition to check for dictionary type and correct index access

08c64b6f
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -2
Modified g4f/Provider/needs_auth/Gemini.py +2 -2
@@ -250,8 +250,8 @@ class Gemini(AsyncGeneratorProvider, ProviderModelMixin):
250 250 continue
251 251 response_part = json.loads(line[0][2])
252 252 yield JsonResponse(data=response_part, model=model)
253 if len(response_part) > 11 and response_part[10]:
254 yield TitleGeneration(response_part[10][0].strip())
253 if len(response_part) > 2 and isinstance(response_part[2], dict) and response_part[2].get("11"):
254 yield TitleGeneration(response_part[2].get("11"))
255 255 if len(response_part) < 5:
256 256 continue
257 257 if return_conversation: