just-llm-client 0.2.0

Just a lightweight, composable, and minimal LLM client — not an agent framework
Documentation

just-llm-client

Just a lightweight, composable, and minimal LLM client — not an agent framework.

Quick start

# Cargo.toml
[dependencies]
just-llm-client = "0.1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
use just_llm_client::{
    LlmBackend,
    provider::DeepSeekBackend,
    types::chat::{ChatCompletionRequest, ChatMessage},
};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let backend = DeepSeekBackend::new(
        reqwest::Client::builder().use_rustls_tls(),
        "your-api-key",
        None,
    )?;

    let response = backend
        .chat_completion(
            ChatCompletionRequest::new(
                "deepseek-chat",
                vec![ChatMessage::user("Say hello in one sentence.")],
            )
            .with_system_prompt("You are a concise assistant."),
        )
        .await?;

    println!("{}", response.first_choice_content().unwrap_or_default());
    Ok(())
}

Feature flags

Feature Default Description
deepseek yes Enables the [just-deepseek] backend
openai-compat yes Enables the [just-openai-compat] backend

Both providers are enabled by default. Disable default features and enable only what you need:

[dependencies]
just-llm-client = { version = "0.1", default-features = false, features = ["deepseek"] }

Ecosystem

Crate Description
just-deepseek DeepSeek API client + wire-level types
just-openai-compat OpenAI-compatible API client + wire-level types
just-common Shared HTTP transport and error types