Create a pydantic model with the given field definitions.
create_model(
model_name: str,
*,
field_definitions: dict[str, Any] | None = None,
root: Any | None = None
) -> type[BaseModel]Attention:
Please do not use outside of langchain packages. This API is subject to change at any time.
| Name | Type | Description |
|---|---|---|
model_name* | str | The name of the model. |
module_name* | unknown | The name of the module where the model is defined. This is used by Pydantic to resolve any forward references. |
field_definitions | dict[str, Any] | None | Default: NoneThe field definitions for the model. |
root | Any | None | Default: NoneType for a root model (RootModel) |