gemini-api-php / client

Google Gemini API PHP Client allows you to use the Gemini AI model
MIT License
97 stars 16 forks source link

How do I test this locally? #33

Open pdolinaj opened 2 months ago

pdolinaj commented 2 months ago

When testing locally I get this error:

PHP Fatal error: Uncaught RuntimeException: Gemini API operation failed: operation=models/gemini-pro:generateContent, status_code=400, response={ "error": { "code": 400, "message": "User location is not supported for the API use without a billing account linked.", "status": "FAILED_PRECONDITION" } }

However, when I deploy to Live server, it all works fine.

How can I test this locally? Thank you