google-gemini-php / client

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

Support json format response #14

Closed abdobargush closed 6 months ago

abdobargush commented 6 months ago

Hello,

Google have added support for response_mime_type as generationConfig in Gemini 1.5 Pro model https://ai.google.dev/gemini-api/docs/api-overview#json

If It's ok I can make PR for it.

aydinfatih commented 6 months ago

Hello @abdobargush , First of all, thank you for your feedback.

When I checked, this option is still in beta. You can turn on PR when it comes out of beta.

Stable version: https://ai.google.dev/api/rest/v1/GenerationConfig

Beta version: https://ai.google.dev/api/rest/v1beta/GenerationConfig

aydinfatih commented 1 month ago

Hi @abdobargush This feature has been added to the beta version. You can use it by updating the version of the package in composer.json to the version I specified.

https://packagist.org/packages/google-gemini-php/client#1.0.0-beta

You can check the PR https://github.com/google-gemini-php/client/pull/34