View Source Anthropic.Config (anthropic_community v0.3.0)
Module for setting up the configuration of Anthropic API.
Summary
Functions
Returns a specification to start this module under a supervisor.
Retrieves the current configuration options.
Resets specific configuration options.
Types
@type config_option() :: {:model, String.t()} | {:anthropic_version, String.t()} | {:api_url, String.t()} | {:max_tokens, non_neg_integer()} | {:temperature, float()} | {:top_p, float()} | {:top_k, non_neg_integer()} | {:api_key, String.t()}
@type config_options() :: [config_option()]
@type t() :: %Anthropic.Config{ anthropic_version: String.t() | nil, api_key: String.t() | nil, api_url: String.t() | nil, max_tokens: non_neg_integer() | nil, model: String.t() | nil, temperature: float() | nil, top_k: non_neg_integer() | nil, top_p: float() | nil }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Retrieves the current configuration options.
This function queries the GenServer to return the current state, which represents the active configuration.
Returns
- The current configuration as a
Anthropic.Config
struct.
Resets specific configuration options.
Allows dynamically updating the configuration by merging provided options with the current state. The updated configuration is then validated.
Parameters
keyword_list
: A keyword list of configuration options to update.
Returns
- The updated configuration as a
Anthropic.Config
struct.