[Feature Request]: Support for Loading response_format
as a Pydantic Model from Configuration Files
#152
Labels
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
Currently, when loading configurations using
config_list_from_json
, theresponse_format
must be dynamically added to each configuration in the code. For example:While this approach works, it would be beneficial to explore whether
response_format
could be specified directly in the configuration file.Describe the solution you'd like
We could support defining and generating a Pydantic model from JSON schema when
response_format
is provided in the configuration file.Tools like
[datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator)
exist for generating Pydantic models dynamically, we could use something like that.Additional context
Only consideration is the feasibility of defining and generating a Pydantic model from JSON schema when response_format is provided in the configuration file. This functionality was discussed before in Pydantic, but implementing it was deferred at that time.
The text was updated successfully, but these errors were encountered: