model-gateway-rs
model-gateway-rs is a Rust library that provides a minimal, LLM-centric interface with a chat completions implementation, while keeping vision model data structures for future use.
Features
- Minimal
Llmtrait withchat_onceandchat_stream ChatCompletionsLlmimplementation usingv1/chat/completions- Vision model request/response types (no client implementation yet)
- Async-friendly, built with
async-trait
Directory structure
src/
├── llm/ # LLM trait + chat completions implementation
├── model/ # Shared request/response data structures (includes vision types)
└── lib.rs # Library entry point
Usage
Add to your Cargo.toml:
= { = "https://github.com/code-serenade/model-gateway-rs" }
Example (chat_completions):
use ;
async
License
MIT