langchain_core.runnables.utils.create_model¶

langchain_core.runnables.utils.create_model(__model_name: str, **field_definitions: Any) Type[BaseModel][source]¶

Create a pydantic model with the given field definitions.

Parameters
  • __model_name (str) – The name of the model.

  • **field_definitions (Any) – The field definitions for the model.

Returns

The created model.

Return type

Type[BaseModel]