nat.atif.content#
Content models for multimodal ATIF trajectories (ATIF v1.6+).
Classes#
Image source specification for images stored as files or at remote URLs. |
|
A single content part within a multimodal message. |
Module Contents#
- class ImageSource(/, **data: Any)#
Bases:
pydantic.BaseModelImage source specification for images stored as files or at remote URLs.
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.selfis explicitly positional-only to allowselfas a field name.- media_type: Literal['image/jpeg', 'image/png', 'image/gif', 'image/webp'] = None#
- model_config#
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- class ContentPart(/, **data: Any)#
Bases:
pydantic.BaseModelA single content part within a multimodal message.
Used when a message or observation contains mixed content types (text and images). For text-only content, a plain string can still be used instead of a ContentPart array.
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.selfis explicitly positional-only to allowselfas a field name.- type: Literal['text', 'image'] = None#
- source: ImageSource | None = None#
- model_config#
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- validate_content_type() ContentPart#
Validate that the correct fields are present for each content type.