class

OpenRouter::Tool

Inherits JSON::Serializable < Reference < Object

Constructors

new(function : Function)
Source
new(name : String, description : String | Nil = nil, parameters : Array(FunctionParameter) = [] of FunctionParameter)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Class methods

from_json(string_or_io)

Custom deserialization to handle complex function structure

Source

Instance methods

function
Source
function=(function : Function)
Source
to_json(json : JSON::Builder)

Custom serialization for complex structure

Source
type
Source
type=(type : String)
Source