struct AI::Provider::LanguageModel::FunctionTool

Overview

A function tool definition.

Included Modules

Defined in:

ai/provider/language_model/types.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, input_schema : JSON::Any, description : String | Nil = nil, input_examples : Array(JSON::Any) | Nil = nil, strict : Bool | Nil = nil, provider_options : Shared::ProviderOptions | 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 description : String | Nil #

A description of the tool.


[View source]
def input_examples : Array(JSON::Any) | Nil #

Example inputs for the tool.


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

The JSON schema for the tool's input parameters.


[View source]
def name : String #

The name of the tool.


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

Provider-specific options.


[View source]
def strict : Bool | Nil #

Whether strict mode is enabled.


[View source]
def type : String #

Always "function" for function tools.


[View source]