Synaptic.Tools.Tool (synaptic v0.2.6)

View Source

Struct describing an LLM-callable tool.

Summary

Functions

Builds a tool struct from a keyword list or map.

Serializes the tool to an OpenAI-compatible payload.

Types

t()

@type t() :: %Synaptic.Tools.Tool{
  description: String.t(),
  handler: (map() -> term()),
  name: String.t(),
  schema: map()
}

Functions

new(tool)

Builds a tool struct from a keyword list or map.

to_openai(tool)

Serializes the tool to an OpenAI-compatible payload.