struct

AI::Provider::LanguageModel::FunctionTool

Inherits JSON::Serializable < Struct < Value < Object

A function tool definition.

Constructors

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)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

description

A description of the tool.

Source
input_examples

Example inputs for the tool.

Source
input_schema

The JSON schema for the tool's input parameters.

Source
name

The name of the tool.

Source
provider_options

Provider-specific options.

Source
strict

Whether strict mode is enabled.

Source
type

Always "function" for function tools.

Source