langchaingo
langchaingo copied to clipboard
Allow Gemini to be forced to respond with JSON.
The Google Gemini API allows for a "responseMimeType" and "responseSchema" to be given as inputs forcing the response to be formatted in the specified format.
Is there any plans to enable this functionality?
Here are some details: https://ai.google.dev/api/rest/v1beta/GenerationConfig
@dylanmazurek Yes this is absolutely a priority!
@tmc, I didn't find an open PR for this, so I assume this isn't being worked on currently. I would start working on implementing support for responseMimeType tomorrow. responseSchema seems a bit trickier because there is no field in CallOptions for that at the moment.