async-llm 0.10.0

Async Rust client for LLM APIs - Anthropic Messages API today; fork of async-anthropic with thinking-block and prompt-cache support.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// examples/models.rs

use async_llm::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::default();

    let response = client.models().list().await?;

    println!("{response:?}");

    let response = client.models().get("claude-3-7-sonnet-20250219").await?;

    println!("{response:?}");

    Ok(())
}