Jidoka.Agent.Spec.Generation (Jidoka v0.9.0)

Copy Markdown View Source

Provider-facing generation defaults for an agent.

Generation parameters are intentionally permissive because the supported option set varies by model and provider. Jidoka owns the merge shape, while ReqLLM/provider clients own final option validation.

Summary

Functions

Normalizes optional generation settings.

Builds generation settings from keyword or map attributes.

Builds generation settings and raises if the attributes are invalid.

Returns the Zoi schema for model generation settings.

Converts generation settings to options for ReqLLM.

Types

t()

@type t() :: %Jidoka.Agent.Spec.Generation{
  extra: map(),
  params: map(),
  provider_options: map()
}

Functions

from_input(generation)

@spec from_input(t() | keyword() | map() | nil) :: {:ok, t()} | {:error, term()}

Normalizes optional generation settings.

new(attrs \\ [])

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

Builds generation settings from keyword or map attributes.

new!(attrs \\ [])

@spec new!(keyword() | map()) :: t()

Builds generation settings and raises if the attributes are invalid.

schema()

@spec schema() :: Zoi.schema()

Returns the Zoi schema for model generation settings.

to_req_llm_opts(input)

@spec to_req_llm_opts(t() | keyword() | map() | nil) :: keyword()

Converts generation settings to options for ReqLLM.