Support Gemini Structured outputs #6846
fernando-deka
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Checked
Feature request
Gemini models support structured output JSON schemas:
https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/control-generated-output#generativeaionvertexai_gemini_controlled_generation_response_schema-drest
Currently langchain only supports setting the
responseMimeType
to json but does not set theresponseSchema
to ensure that the JSON follows the given schema.Motivation
Currently when using the built in
.withStructuredOutput
the model usually fails with complex schemas. With this feature the reliability would increase a lot.Proposal (If applicable)
No response
Beta Was this translation helpful? Give feedback.
All reactions