Create a Pydantic model with the given field definitions.
Do not use outside of langchain packages. This API is subject to change at any time.
create_model_v2(
model_name: str,
*,
module_name: str | None = None,
field_definitions: dict[str, Any] | None = None,
root: Any | None = None
) -> type[BaseModel]| Name | Type | Description |
|---|---|---|
model_name* | str | The name of the model. |
module_name | str | None | Default: NoneThe 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 ( |