Open mwigh opened 1 month ago
TypedDict
, Dataclass
, and Pydantic
.I don't think this fills both those requirements. I'll have to re-read this in more detail.
Could you also add tests to cover the cases you're fixing? This way we insure against backsliding.
@markmcd see comments in #560 I do not know what cases you want to cover
Needs to set required fields as required
Description of the change
When feeding a response_schema of type TypedDict to a GenerationConfig, then we need to set the field as required if it is required. This codes does that. It also avoids setting optional fields (Optional and NotRequired) as required.
Motivation
It solves the issue described in #560
Type of change
Bug fix
Checklist
git pull --rebase upstream main
).