View Source Shifts.Tool behaviour (Shifts v0.0.2)
TODO
Summary
Callbacks
Invoked when the tool is called, and must return a String.t()
value.
Functions
Sets the tool description.
Sets the tool name.
Creates a new Shifts.Tool.t/0
struct from the given options.
Sets a tool parameter.
TODO
Types
@type args() :: %{optional(String.t()) => arg_type()}
@type param() :: {atom(), param_type(), String.t()}
@type param_type() :: :string | :integer | :float
@type t() :: %Shifts.Tool{ description: String.t(), function: (Shifts.Shift.t(), args() -> String.t() | Shifts.Chat.t()), name: String.t(), params: [param()] }
TODO
@type tool_record() :: tool_call() | tool_result()
Callbacks
@callback call(shift :: Shifts.Shift.t(), args :: map()) :: String.t() | Shifts.Chat.t()
Invoked when the tool is called, and must return a String.t()
value.
Receives the context Shifts.Shift.t/0
and a map of arguments.
Functions
Sets the tool description.
Sets the tool name.
Creates a new Shifts.Tool.t/0
struct from the given options.
@spec param(atom(), param_type(), String.t()) :: Macro.t()
Sets a tool parameter.
TODO
TODO