vllora_llm SDK provides a unified interface for interacting with multiple LLM providers including OpenAI, Anthropic, Gemini, and AWS Bedrock.
Installation
Addvllora_llm to your Cargo.toml:
Quick Start
Here’s a minimal example using OpenAI:Core Components
VlloraLLMClient
Learn how to configure and use the main client
Completions API
Send chat completion requests to LLMs
Streaming
Stream responses in real-time
Supported Providers
The SDK supports multiple LLM providers through a unified interface:- OpenAI - GPT models (gpt-4, gpt-3.5-turbo, etc.)
- Anthropic - Claude models (claude-opus, claude-sonnet, etc.)
- Google Gemini - Gemini models
- AWS Bedrock - Various models via Bedrock
- Custom Proxy - Any OpenAI-compatible endpoint
Key Features
- Unified API: Single interface across all providers
- Type Safety: Full Rust type safety with builder patterns
- Async/Await: Built on Tokio for high-performance async operations
- Streaming Support: Real-time response streaming with
tokio-stream - Error Handling: Comprehensive error types with
LLMResult<T> - Telemetry: Built-in tracing support via
vllora_telemetry
Error Handling
All SDK operations returnLLMResult<T>, which is an alias for Result<T, LLMError>:
Next Steps
Client Configuration
Learn about advanced client configuration options
Examples
Explore complete examples in the repository