jeremychone/rust-genai
Rust multiprovider generative AI client (Ollama, OpenAi, Anthropic, Gemini, DeepSeek, ZAI, OpenRouter, FireworksAI, xAI/Grok, Groq,, ...)
What it solves
This library provides a unified, ergonomic way to interact with many different AI providers (such as OpenAI, Anthropic, Gemini, and Ollama) using a single Rust API. It eliminates the need to manage multiple, separate SDKs for each service.
How it works
It uses a native-protocol approach, meaning it communicates with each AI provider using its preferred method. When a provider offers a native API, the library uses it to access specialized features like reasoning controls or streaming metadata. For services that primarily use OpenAI-compatible APIs, it uses that compatibility layer. You can target models by name, and the library automatically selects the correct adapter, or you can force a specific provider using a namespace prefix (e.g., groq::model-name).
Who it’s for
It is designed for Rust developers who want a streamlined, consistent interface for text chat, vision, and function calling across various AI services without the overhead of maintaining multiple service-specific dependencies.
Highlights
- Supports a wide range of providers including Anthropic, OpenAI, Gemini, xAI, Ollama, Groq, Cohere, and many others.
- Enables image analysis for supported models.
- Provides flexible configuration for custom endpoints, authentication, and model mapping.
- Offers a consistent API for chat generation options like temperature and token limits.
- Includes advanced features like stream frame inspection and thought signature preservation.
Related
- Project
- Project
- Project
- Project
- Project