Introducing RLLM: A Rust Library for Multi-Backend LLMs (OpenAI, Anthropic, Ollama, etc.)

59 points graniet75 15 comments

Hey Rustaceans! I’ve been working on RLLM, a crate that aims to unify multiple LLM backends—OpenAI, Anthropic (Claude), Ollama, and more—into a single, developer-friendly interface. Here are the highlights:

  • Builder Pattern: Configure your LLM with a straightforward builder (e.g., .backend(LLMBackend::OpenAI).api_key("...").model("gpt-3.5-turbo")).
  • Chat & Completions: Two core traits (ChatProvider, CompletionProvider) to handle both conversation flows and text completions.
  • Feature Flags: Activate only the backends you need (openai, anthropic, ollama) to keep your build minimal.

If you’re curious, give it a try and feel free to open issues or PRs. Let’s make Rust LLM integration cleaner and more accessible!