EvanZhouDev / gemini-ai

The simpler JavaScript Gemini SDK
https://www.npmjs.com/package/gemini-ai
GNU General Public License v3.0
95 stars 16 forks source link

Ability to Respond with Specific JSON Schema #12

Closed EvanZhouDev closed 4 weeks ago

EvanZhouDev commented 1 month ago

Make it so that you can pass in a JSON schema, and have Gemini only respond with that schema. https://ai.google.dev/gemini-api/docs/api-overview#json

Presumably, this will automatically toggle format to Gemini.JSON and reject the format otherwise.

EvanZhouDev commented 4 weeks ago

This has been implemented in Gemini AI v2.2, which is now available on NPM.