google-gemini-php / laravel

⚡️ Gemini PHP for Laravel is a community-maintained PHP API client that allows you to interact with the Gemini AI API.
MIT License
300 stars 32 forks source link

Undefined array key "content" #6

Closed ducdevtlu closed 6 months ago

ducdevtlu commented 6 months ago

ErrorException: Undefined array key "content" in file D:\basic-auth-app\vendor\google-gemini-php\client\src\Data\Candidate.php on line 51

0 D:\basic-auth-app\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(255): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()

1 D:\basic-auth-app\vendor\google-gemini-php\client\src\Data\Candidate.php(51): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap{closure}()

2 D:\basic-auth-app\vendor\google-gemini-php\client\src\Responses\GenerativeModel\GenerateContentResponse.php(94): Gemini\Data\Candidate::from()

3 [internal function]: Gemini\Responses\GenerativeModel\GenerateContentResponse::Gemini\Responses\GenerativeModel{closure}()

4 D:\basic-auth-app\vendor\google-gemini-php\client\src\Responses\GenerativeModel\GenerateContentResponse.php(95): array_map()

5 D:\basic-auth-app\vendor\google-gemini-php\client\src\Resources\GenerativeModel.php(89): Gemini\Responses\GenerativeModel\GenerateContentResponse::from()

6 D:\basic-auth-app\vendor\google-gemini-php\client\src\Resources\ChatSession.php(37): Gemini\Resources\GenerativeModel->generateContent()

aydinfatih commented 6 months ago

Hello @ducdevtlu ,

I have not been able to reproduce this problem. Exactly which method is failing. What do I need to do to reproduce the problem?

aydinfatih commented 6 months ago

Since there is no response, I am closing this issue. You can reopen it at any time.