struct AI::Provider::LanguageModel::ToolResult

Overview

Result of a tool call.

Included Modules

Defined in:

ai/provider/language_model/types.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(tool_call_id : String, tool_name : String, result : JSON::Any, is_error : Bool | Nil = nil, preliminary : Bool | Nil = nil, dynamic : Bool | Nil = nil, provider_metadata : Shared::ProviderMetadata | Nil = nil) #

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

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

[View source]

Instance Method Detail

def dynamic : Bool | Nil #

Whether the tool is dynamic.


[View source]
def is_error : Bool | Nil #

Whether the result is an error.


[View source]
def preliminary : Bool | Nil #

Whether the result is preliminary.


[View source]
def provider_metadata : Shared::ProviderMetadata | Nil #

Provider-specific metadata.


[View source]
def result : JSON::Any #

Result of the tool call (JSON-serializable).


[View source]
def tool_call_id : String #

ID of the tool call this result is associated with.


[View source]
def tool_name : String #

Name of the tool that generated this result.


[View source]
def type : String #

[View source]