is_basemodel_subclass#
- langchain_core.utils.pydantic.is_basemodel_subclass(cls: type) bool [source]#
Check if the given class is a subclass of Pydantic BaseModel.
Check if the given class is a subclass of any of the following:
pydantic.BaseModel in Pydantic 1.x
pydantic.BaseModel in Pydantic 2.x
pydantic.v1.BaseModel in Pydantic 2.x
- Parameters:
cls (type)
- Return type:
bool