Ask a question to get started
Enter to send•Shift+Enter new line
Create a Pydantic model with the given field definitions.
Please use create_model_v2 instead of this function.
create_model_v2
create_model( model_name: str, module_name: str | None = None, , **field_definitions: Any = {} ) -> type[BaseModel]
model_name
str
The name of the model.
module_name
str | None
None
The name of the module where the model is defined.
This is used by Pydantic to resolve any forward references.
**field_definitions
Any
{}
The field definitions for the model.