返回提交历史
Modified
g4f/Provider/needs_auth/Gemini.py
+2
-2
XFEstudio/gpt4free
Fix response handling in Gemini: update TitleGeneration condition to check for dictionary type and correct index access
08c64b6f
代码差异
1 个文件
+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: