aiq.data_models.common#
Attributes#
Classes#
Subclass of a Pydantic BaseModel that is hashable. Use in objects that need to be hashed for caching purposes. |
|
Subclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions. |
Functions#
|
Compute a class' subclass depth. |
|
Get the origin of a type or the base class if it is not a generic. |
Module Contents#
- _LT#
- class HashableBaseModel(/, **data: Any)#
Bases:
pydantic.BaseModel
Subclass of a Pydantic BaseModel that is hashable. Use in objects that need to be hashed for caching purposes.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.
- _get_origin_or_base(cls: type) type #
Get the origin of a type or the base class if it is not a generic.
- class BaseModelRegistryTag#
- class TypedBaseModel(/, **data: Any)#
Bases:
pydantic.BaseModel
Subclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- classmethod static_type()#
- classmethod static_full_type()#
- TypedBaseModelT#