Altar.ADM.ToolConfig (Altar v0.1.2)

View Source

ToolConfig encapsulates model/tool-calling configuration, including mode and an optional allowlist of function names.

Use new/1 to construct validated instances.

Summary

Types

Tool selection mode.

t()

A validated ToolConfig struct.

Functions

Construct a new validated ToolConfig.

Types

mode()

@type mode() :: :auto | :any | :none

Tool selection mode.

t()

@type t() :: %Altar.ADM.ToolConfig{function_names: [String.t()], mode: mode()}

A validated ToolConfig struct.

Functions

new(attrs)

@spec new(map() | keyword()) :: {:ok, t()} | {:error, String.t()}

Construct a new validated ToolConfig.

Accepts a map or keyword list with:

  • :mode (required): one of :auto | :any | :none

  • :function_names (optional): list of strings, defaults to []

Returns {:ok, %ToolConfig{}} on success or {:error, reason}.