pub struct AnthropicConfig {
pub base_url: String,
pub api_key: String,
pub model: String,
pub max_tokens: i32,
pub temperature: Option<f64>,
pub anthropic_version: String,
}Expand description
Deployment-side credentials + endpoint for the Anthropic Messages API.
max_tokens is required by Anthropic on every request, so we hold it
here (default below) rather than relying on the agent recipe.
Fields§
§base_url: String§api_key: String§model: String§max_tokens: i32Required by Anthropic. Defaults to 4096 if the spec snapshot
doesn’t override; we surface it on the config so HR can tune via
spec_snapshot.agent_spec_version.model_config.max_tokens.
temperature: Option<f64>§anthropic_version: StringWire-format version pin. Defaults to “2023-06-01” — the only one supported by Messages API at time of writing. Override if Anthropic ever publishes a newer one we want to opt into.
Implementations§
Source§impl AnthropicConfig
impl AnthropicConfig
Sourcepub const DEFAULT_VERSION: &'static str = "2023-06-01"
pub const DEFAULT_VERSION: &'static str = "2023-06-01"
Default anthropic-version header value the client sends if HR
doesn’t override it.
Sourcepub const DEFAULT_MAX_TOKENS: i32 = 4096
pub const DEFAULT_MAX_TOKENS: i32 = 4096
Default max_tokens when the agent recipe doesn’t specify.
4096 is small enough to keep cost-of-mistake bounded; HR is
expected to override on real workloads.
Trait Implementations§
Source§impl Clone for AnthropicConfig
impl Clone for AnthropicConfig
Source§fn clone(&self) -> AnthropicConfig
fn clone(&self) -> AnthropicConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more