struct ACP::Protocol::ToolCallContentBlock

Included Modules

Defined in:

acp/protocol/tool_call_content.cr

Constructors

Instance Method Summary

Instance methods inherited from struct ACP::Protocol::ToolCallContent

type : String type

Constructor methods inherited from struct ACP::Protocol::ToolCallContent

new(pull : JSON::PullParser) new

Constructor Detail

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

[View source]
def self.new(content : ContentBlock, meta : Hash(String, JSON::Any) | Nil = nil) #

[View source]

Instance Method Detail

def content : ContentBlock #

The actual content block (text, image, audio, resource, resource_link).


[View source]
def content=(content : ContentBlock) #

The actual content block (text, image, audio, resource, resource_link).


[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 text : String | Nil #

Convenience: returns the text if the inner content is a TextContentBlock.


[View source]
def type : String #

Always "content" for this variant.


[View source]