Closed yanglongji closed 5 months ago
Undefined array key "parts"[58] in /vendor/google-gemini-php/client/src/Data/Content.php also this key
Hello @yanglongji ,
Thanks for your feedback.
I was able to reproduce the problem locally. As far as I understand, it seems to be a general problem with gemini ai. Gemini returns the following response in some requests other than the normal api response.
https://github.com/google/generative-ai-docs/issues/257
{
"finishReason": "RECITATION",
"index" : 0,
}
We have a new fix for this issue. Can you update the package and check again? https://github.com/google-gemini-php/client/releases/tag/1.0.4
key "content" may not return, should fix this