class

LLM::LocalFunction

Inherits LLM::Function < Reference < Object

Defines a subclass of Function that can be used to implement local (in-code) tools / functions easily

Constructors

new(origin = "LEGACY / Built-in", settings = nil)
Source

Instance methods

input_json_schema(json : JSON::Builder)

The input schema for the parameters to this function, into the JSON builder.

Source

Macros

description(str)

Define the description for the function, same for both static and runtime.

Source
name(str)

Set the name for the function.

Source
param(name, description, type = Param::Type::Str, required = false)

Define a parameter for this LLM Function.

Source
runner(runner_type)

Define the method that is used to create the Runner

Source
runtime_description(str)

Define the runtime description only for the function.

Source
side_effects(effects)

Set the name for the function.

Source
static_description(str)

Define the static description only for the function.

Source

Nested types