Keep required fields spec in the structured-output schema
- re https://github.com/google-gemini/generative-ai-python/issues/642
Please see the context in https://github.com/google-gemini/generative-ai-python/issues/642. I don't think this blanket change is acceptable, but IMHO neither is the current blanket removal of required field. I'm looking forward to directions how to properly support required fields in the structured-output, given the current state of the Gemini services.
I'm happy to make any required changes to this PR.
I will note that in my specific case, for a nested Pydantic schema, the Gemini API worked fine with this patch. So I wonder if the change from https://github.com/google-gemini/generative-ai-python/pull/309 is still required and if yes in what cases?
Please see the context in #642. I don't think this blanket change is acceptable, but IMHO neither is the current blanket removal of
requiredfield. I'm looking forward to directions how to properly support required fields in the structured-output, given the current state of the Gemini services.I'm happy to make any required changes to this PR.
No