pub struct AnthropicConfig { /* private fields */ }Expand description
Anthropic credentials and endpoint configuration.
let config = providers_kit::config::AnthropicConfig::new(
providers_kit::config::ApiKey::new("anthropic-test")?,
);
let _ = config;
Implementations§
Source§impl AnthropicConfig
impl AnthropicConfig
Sourcepub fn new(api_key: ApiKey) -> Self
pub fn new(api_key: ApiKey) -> Self
Creates a configuration for the public Anthropic endpoint.
This only constructs configuration; provider operations perform network I/O.
§Examples
use providers_kit::config::{ApiKey, AnthropicConfig};
let config = AnthropicConfig::new(ApiKey::new("example-key")?);
let _owned_configuration = config;
Sourcepub fn with_base_url(self, base_url: Url) -> Self
pub fn with_base_url(self, base_url: Url) -> Self
Replaces the API base URL.
This only constructs configuration; provider operations perform network I/O.
§Examples
use providers_kit::config::{ApiKey, AnthropicConfig};
let config = AnthropicConfig::new(ApiKey::new("example-key")?);
let config = config.with_base_url("https://example.com/api".parse().unwrap());
let _owned_configuration = config;
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnthropicConfig
impl RefUnwindSafe for AnthropicConfig
impl Send for AnthropicConfig
impl Sync for AnthropicConfig
impl Unpin for AnthropicConfig
impl UnsafeUnpin for AnthropicConfig
impl UnwindSafe for AnthropicConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more