struct
ACP::Protocol::ImageContentBlock
- ACP::Protocol::ImageContentBlock
- ACP::Protocol::ContentBlock
- Struct
- Value
- Object
Overview
An image content block. Requires the image prompt capability.
See: https://agentclientprotocol.com/protocol/content#image-content
Included Modules
- JSON::Serializable
Defined in:
acp/protocol/content_block.crConstructors
-
.new(pull : JSON::PullParser)
An image content block.
- .new(data : String, mime_type : String = "image/png", uri : String | Nil = nil, annotations : Annotations | Nil = nil, meta : Hash(String, JSON::Any) | Nil = nil)
Instance Method Summary
-
#annotations : Annotations | Nil
Optional metadata about how the content should be used or displayed.
-
#annotations=(annotations : Annotations | Nil)
Optional metadata about how the content should be used or displayed.
-
#data : String
Base64-encoded image data (required).
-
#data=(data : String)
Base64-encoded image data (required).
-
#meta : Hash(String, JSON::Any) | Nil
Extension metadata.
-
#meta=(meta : Hash(String, JSON::Any) | Nil)
Extension metadata.
-
#mime_type : String
MIME type of the image (e.g., "image/png", "image/jpeg") (required).
-
#mime_type=(mime_type : String)
MIME type of the image (e.g., "image/png", "image/jpeg") (required).
-
#type : String
Always "image" for this block type.
-
#uri : String | Nil
Optional URI reference for the image source.
-
#uri=(uri : String | Nil)
Optional URI reference for the image source.
-
#url : String | Nil
@deprecated Use
#uriinstead.
Instance methods inherited from struct ACP::Protocol::ContentBlock
type : String
type
Constructor methods inherited from struct ACP::Protocol::ContentBlock
new(pull : JSON::PullParser)
new
Constructor Detail
An image content block. Requires the image prompt capability.
See: https://agentclientprotocol.com/protocol/content#image-content
Instance Method Detail
Optional metadata about how the content should be used or displayed.
Optional metadata about how the content should be used or displayed.
MIME type of the image (e.g., "image/png", "image/jpeg") (required).