pub struct AnthropicFactory;Expand description
Factory for creating AnthropicProvider instances from configuration.
Register this factory with the global registry to enable config-driven provider instantiation:
use llm_stack::ProviderRegistry;
use llm_stack_anthropic::AnthropicFactory;
ProviderRegistry::global().register(Box::new(AnthropicFactory));§Configuration
| Field | Required | Description |
|---|---|---|
provider | Yes | Must be "anthropic" |
api_key | Yes | Anthropic API key |
model | Yes | Model identifier (e.g., "claude-sonnet-4-20250514") |
base_url | No | Custom API endpoint |
timeout | No | Request timeout |
extra.max_tokens | No | Default max tokens (default: 4096) |
extra.api_version | No | API version header |
Trait Implementations§
Source§impl Clone for AnthropicFactory
impl Clone for AnthropicFactory
Source§fn clone(&self) -> AnthropicFactory
fn clone(&self) -> AnthropicFactory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnthropicFactory
impl Debug for AnthropicFactory
Source§impl Default for AnthropicFactory
impl Default for AnthropicFactory
Source§fn default() -> AnthropicFactory
fn default() -> AnthropicFactory
Returns the “default value” for a type. Read more
Source§impl ProviderFactory for AnthropicFactory
impl ProviderFactory for AnthropicFactory
impl Copy for AnthropicFactory
Auto Trait Implementations§
impl Freeze for AnthropicFactory
impl RefUnwindSafe for AnthropicFactory
impl Send for AnthropicFactory
impl Sync for AnthropicFactory
impl Unpin for AnthropicFactory
impl UnwindSafe for AnthropicFactory
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