content_blocks
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| Annotations aclientp.schema.content_blocks Optional annotations for the client. |
||
| AudioContentBlock aclientp.schema.content_blocks Audio data for transcription or analysis. |
||
| BaseContentBlock aclientp.schema.content_blocks Base content block. |
||
| BaseResourceContents aclientp.schema.content_blocks Text-based resource contents. |
||
| BlobResourceContents aclientp.schema.content_blocks Binary resource contents. |
||
| EmbeddedResourceContentBlock aclientp.schema.content_blocks Complete resource contents embedded directly in the message. |
||
| ImageContentBlock aclientp.schema.content_blocks Images for visual context or analysis. |
||
| ResourceContentBlock aclientp.schema.content_blocks References to resources that the agent can access. |
||
| TextContentBlock aclientp.schema.content_blocks Text content. |
||
| TextResourceContents aclientp.schema.content_blocks Text-based resource contents. |
🛈 DocStrings¶
Content block schema definitions.
Annotations
¶
Bases: AnnotatedObject
Optional annotations for the client.
The client can use annotations to inform how objects are used or displayed.
Source code in src/aclientp/schema/content_blocks.py
audience
class-attribute
instance-attribute
¶
Audience for the annotated resource.
last_modified
class-attribute
instance-attribute
¶
Last modified timestamp of the annotated resource.
priority
class-attribute
instance-attribute
¶
Priority of the annotated resource.
optionally_create
classmethod
¶
optionally_create(
audience: Audience | None = None,
last_modified: datetime | str | None = None,
priority: float | None = None,
) -> Self | None
Create an annotations object if any value is given, otherwise return None.
Source code in src/aclientp/schema/content_blocks.py
AudioContentBlock
¶
Bases: BaseContentBlock
Audio data for transcription or analysis.
Requires the audio prompt capability when included in prompts.
Source code in src/aclientp/schema/content_blocks.py
BaseContentBlock
¶
Bases: AnnotatedObject
Base content block.
Source code in src/aclientp/schema/content_blocks.py
annotations
class-attribute
instance-attribute
¶
annotations: Annotations | None = None
Annotations for the content block.
BaseResourceContents
¶
Bases: AnnotatedObject
Text-based resource contents.
Source code in src/aclientp/schema/content_blocks.py
BlobResourceContents
¶
Bases: BaseResourceContents
Binary resource contents.
Source code in src/aclientp/schema/content_blocks.py
EmbeddedResourceContentBlock
¶
Bases: BaseContentBlock
Complete resource contents embedded directly in the message.
Preferred for including context as it avoids extra round-trips.
Requires the embeddedContext prompt capability when included in prompts.
Source code in src/aclientp/schema/content_blocks.py
resource
instance-attribute
¶
Resource content that can be embedded in a message.
ImageContentBlock
¶
Bases: BaseContentBlock
Images for visual context or analysis.
Requires the image prompt capability when included in prompts.
Source code in src/aclientp/schema/content_blocks.py
ResourceContentBlock
¶
Bases: BaseContentBlock
References to resources that the agent can access.
All agents MUST support resource links in prompts.
Source code in src/aclientp/schema/content_blocks.py
TextContentBlock
¶
Bases: BaseContentBlock
Text content.
May be plain text or formatted with Markdown.
All agents MUST support text content blocks in prompts. Clients SHOULD render this text as Markdown.
Source code in src/aclientp/schema/content_blocks.py
TextResourceContents
¶
Bases: BaseResourceContents
Text-based resource contents.