model-gateway-rs
model-gateway-rs is a Rust library that provides a minimal, LLM-centric interface with concrete implementations per provider.
Features
- Minimal
Llmtrait withchat_onceandchat_stream - Provider-specific implementations (OpenAI Responses, Ollama)
- Async-friendly, built with
async-trait
Directory structure
src/
├── llm/ # LLM trait + provider implementations
├── model/ # Shared request/response data structures
├── types/ # Shared types
└── lib.rs # Library entry point
Usage
Add to your Cargo.toml:
= { = "https://github.com/code-serenade/model-gateway-rs" }
Example (Ollama):
use ;
async
License
MIT