client icon indicating copy to clipboard operation
client copied to clipboard

Support new JSON mode for Gemini 1.5 Pro model

Open dmaicher opened this issue 1 year ago • 2 comments

See https://ai.google.dev/gemini-api/docs/api-overview#json

Seems currently there is no way for me to pass arbitrary/custom data for GenerationConfig

dmaicher avatar May 15 '24 10:05 dmaicher

yes this should def be added

yosun avatar Jul 03 '24 00:07 yosun

This seems to be the only way this library will be able to be used as using the provided examples gives us:

Error! Gemini API operation failed: operation=models/gemini-pro-vision:generateContent, status_code=404, response={ "error": { "code": 404, "message": "Gemini 1.0 Pro Vision has been deprecated on July 12, 2024. Consider switching to different model, for example gemini-1.5-flash.", "status": "NOT_FOUND" } }

joeybab3 avatar Jul 31 '24 03:07 joeybab3

@dmaicher This feature is in beta. This package is currently running stable features. I am planning a version that will support beta features as beta branchi.

@joeybab3 https://github.com/google-gemini-php/client/issues/25

aydinfatih avatar Sep 28 '24 13:09 aydinfatih

@dmaicher @yosun @joeybab3 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

aydinfatih avatar Sep 28 '24 19:09 aydinfatih

Did this feature remain only in version 1.0.0-beta and then got lost?

monteduro avatar Mar 12 '25 19:03 monteduro

@aydinfatih

Did this feature remain only in version 1.0.0-beta and then got lost?

yosun avatar Mar 12 '25 19:03 yosun

It's still available on the beta branch https://github.com/google-gemini-php/client/tree/beta?tab=readme-ov-file#structured-output

Plytas avatar Mar 12 '25 19:03 Plytas