nabugate
Official Rust client for NabuGate, the organisation's OpenAI-compatible AI
gateway. Projects call NabuGate with an alias such as nabu-fast; the gateway
picks the provider, falls back on failure, holds the secrets and meters the cost.
[]
= "1"
Use
use ;
let client = new;
let text = client
.complete_text
.await?;
// Streaming
client
.stream_text
.await?;
// Embeddings — pin the width whenever you store the vectors
let vectors = client.embeddings.await?;
// Images, speech, catalogue
let image = client.images.await?;
let audio = client.speech.await?;
let models = client.models.await?;
Sub-agents
A named assistant is called exactly like a model — pass its name to .model().
Everything passes through
The gateway forwards request bodies to the provider untouched. ChatRequest
names the common fields and .param() sets anything else:
new
.param
.param;
Options
NabuGateClient::new is chained with .base_url(), .default_model() and
.http_client(). Failures return nabugate::Error, whose Api variant carries
the status and body.
MIT licensed.