ExAgent.ModelSettings (ExAgent v0.1.0)

Copy Markdown View Source

Per-request knobs sent to the model. Provider-specific options that are not first-class fields can be carried in the immutable :extra map.

Summary

Functions

Merge two settings, overrides winning on non-nil values.

Build settings from a keyword/enum of options, ignoring nils.

Types

t()

@type t() :: %ExAgent.ModelSettings{
  extra: map(),
  frequency_penalty: float() | nil,
  max_tokens: pos_integer() | nil,
  presence_penalty: float() | nil,
  temperature: float() | nil,
  timeout: pos_integer() | nil,
  top_p: float() | nil
}

Functions

merge(base, overrides)

@spec merge(t(), t() | nil) :: t()

Merge two settings, overrides winning on non-nil values.

new(opts)

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

Build settings from a keyword/enum of options, ignoring nils.