struct AI::Provider::LanguageModel::ToolResultOutput

Overview

Tool result output.

Included Modules

Defined in:

ai/provider/language_model/prompt.cr

Constructors

Instance Method Summary

Constructor Detail

def self.content(value : Array(JSON::Any), provider_options : Shared::ProviderOptions | Nil = nil) : ToolResultOutput #

[View source]
def self.error_json(value : JSON::Any, provider_options : Shared::ProviderOptions | Nil = nil) : ToolResultOutput #

[View source]
def self.error_text(value : String, provider_options : Shared::ProviderOptions | Nil = nil) : ToolResultOutput #

[View source]
def self.execution_denied(reason : String | Nil = nil, provider_options : Shared::ProviderOptions | Nil = nil) : ToolResultOutput #

[View source]
def self.json(value : JSON::Any, provider_options : Shared::ProviderOptions | Nil = nil) : ToolResultOutput #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(type : ToolResultOutputType, text_value : String | Nil = nil, json_value : JSON::Any | Nil = nil, reason : String | Nil = nil, content_value : Array(JSON::Any) | Nil = nil, provider_options : Shared::ProviderOptions | Nil = nil) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]
def self.text(value : String, provider_options : Shared::ProviderOptions | Nil = nil) : ToolResultOutput #

[View source]

Instance Method Detail

def content_value : Array(JSON::Any) | Nil #

[View source]
def json_value : JSON::Any | Nil #

[View source]
def provider_options : Shared::ProviderOptions | Nil #

[View source]
def reason : String | Nil #

[View source]
def text_value : String | Nil #

[View source]
def type : ToolResultOutputType #

[View source]