1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Anthropic Claude provider for the llm-stack SDK.
//!
//! This crate implements [`Provider`](llm_stack::Provider) for Anthropic's
//! Messages API, supporting both non-streaming and streaming generation
//! with full tool-calling and extended thinking support.
//!
//! # Quick start
//!
//! ```rust,no_run
//! use llm_stack_anthropic::{AnthropicConfig, AnthropicProvider};
//! use llm_stack::{ChatMessage, ChatParams, Provider};
//!
//! # async fn example() -> Result<(), llm_stack::LlmError> {
//! let provider = AnthropicProvider::new(AnthropicConfig {
//! api_key: std::env::var("ANTHROPIC_API_KEY").unwrap(),
//! ..Default::default()
//! });
//!
//! let params = ChatParams {
//! messages: vec![ChatMessage::user("Hello!")],
//! ..Default::default()
//! };
//!
//! let response = provider.generate(¶ms).await?;
//! println!("{}", response.text().unwrap_or("no text"));
//! # Ok(())
//! # }
//! ```
pub use AnthropicConfig;
pub use ;
pub use AnthropicProvider;