FAQ
Short answers to common questions. For anything conceptual, the linked pages go deeper.
What is Rig?
Section titled “What is Rig?”Rig is an open-source Rust library for building applications powered by large language models — a unified API across providers, plus higher-level building blocks like agents, tools, RAG, and structured extraction. Start with the Introduction and the Quickstart.
Which model providers does Rig support?
Section titled “Which model providers does Rig support?”Many, behind one unified API — including OpenAI, Anthropic, Google Gemini, Cohere, xAI (Grok), DeepSeek, Groq, Perplexity, Together, Azure OpenAI, Ollama, and Hugging Face. See Model Providers for the full list and setup.
Can I run local or self-hosted models?
Section titled “Can I run local or self-hosted models?”Yes. Use the Ollama integration for models running locally, or point the OpenAI-compatible client at any endpoint that implements the OpenAI API. See Model Providers.
Does Rig support fine-tuning?
Section titled “Does Rig support fine-tuning?”No — Rig focuses on inference and orchestration, not training. Fine-tune with your provider’s tooling, then use the resulting model with Rig like any other model.
What’s the difference between prompt and chat?
Section titled “What’s the difference between prompt and chat?”prompt is for single-turn requests; chat takes a history of previous messages for multi-turn
conversations. See Completions and Agents.
How do I pass provider-specific parameters?
Section titled “How do I pass provider-specific parameters?”Use additional_params on a completion or agent request to send raw, provider-specific fields (the
common ones like temperature and max_tokens have dedicated setters). See
Completions.
How does Rig handle rate limits and retries?
Section titled “How does Rig handle rate limits and retries?”Rig does not retry automatically. Add your own retry/backoff around calls (for example exponential
backoff); cap output with max_tokens to control cost and response length.
Can I use Rig in a web service?
Section titled “Can I use Rig in a web service?”Yes. Rig is fully async (Tokio), so it works with web frameworks like Axum and Actix as well as serverless targets. See the Guides, including the AWS Lambda deploy walkthroughs.
How does Rig compare to other LLM frameworks?
Section titled “How does Rig compare to other LLM frameworks?”Rig gives you the building blocks you’d expect — agents, tools, RAG, and structured extraction — with Rust’s performance and type safety and a single API across providers. See Architecture for how the pieces fit together.
