struct
ACP::Protocol::ContentChunk
- ACP::Protocol::ContentChunk
- Struct
- Value
- Object
Overview
─── Content Chunk ───────────────────────────────────────────────── A streamed item of content, wrapping a ContentBlock. Used in message chunk session updates (user_message_chunk, agent_message_chunk, agent_thought_chunk).
Matches the Rust SDK's ContentChunk struct.
See: https://agentclientprotocol.com/protocol/prompt-turn
Included Modules
- JSON::Serializable
Defined in:
acp/protocol/updates.crConstructors
- .new(pull : JSON::PullParser)
- .new(content : ContentBlock, meta : Hash(String, JSON::Any) | Nil = nil)
Instance Method Summary
-
#content : ContentBlock
A single item of content (text, image, audio, resource, resource_link).
-
#content=(content : ContentBlock)
A single item of content (text, image, audio, resource, resource_link).
-
#meta : Hash(String, JSON::Any) | Nil
Extension metadata.
-
#meta=(meta : Hash(String, JSON::Any) | Nil)
Extension metadata.
-
#text : String | Nil
Convenience: returns the text if the content is a TextContentBlock.
Constructor Detail
Instance Method Detail
def content : ContentBlock
#
A single item of content (text, image, audio, resource, resource_link).
def content=(content : ContentBlock)
#
A single item of content (text, image, audio, resource, resource_link).