struct ACP::Protocol::AudioContentBlock

Overview

An audio content block. Requires the audio prompt capability.

See: https://agentclientprotocol.com/protocol/content#audio-content

Included Modules

Defined in:

acp/protocol/content_block.cr

Constructors

Instance Method Summary

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

def self.new(pull : JSON::PullParser) #

An audio content block. Requires the audio prompt capability.

See: https://agentclientprotocol.com/protocol/content#audio-content


[View source]
def self.new(data : String, mime_type : String = "audio/wav", annotations : Annotations | Nil = nil, meta : Hash(String, JSON::Any) | Nil = nil) #

[View source]

Instance Method Detail

def annotations : Annotations | Nil #

Optional metadata about how the content should be used or displayed.


[View source]
def annotations=(annotations : Annotations | Nil) #

Optional metadata about how the content should be used or displayed.


[View source]
def data : String #

Base64-encoded audio data (required).


[View source]
def data=(data : String) #

Base64-encoded audio data (required).


[View source]
def meta : Hash(String, JSON::Any) | Nil #

Extension metadata.


[View source]
def meta=(meta : Hash(String, JSON::Any) | Nil) #

Extension metadata.


[View source]
def mime_type : String #

MIME type of the audio (e.g., "audio/wav", "audio/mp3") (required).


[View source]
def mime_type=(mime_type : String) #

MIME type of the audio (e.g., "audio/wav", "audio/mp3") (required).


[View source]
def type : String #

Always "audio" for this block type.


[View source]