Closed EvanZhouDev closed 4 weeks 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.
format
Gemini.JSON
This has been implemented in Gemini AI v2.2, which is now available on NPM.
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
toGemini.JSON
and reject theformat
otherwise.