rig_core/providers/mod.rs
1//! Provider integrations included in `rig-core`.
2//!
3//! - Anthropic
4//! - Azure OpenAI
5//! - ChatGPT and GitHub Copilot auth-backed clients
6//! - Cohere
7//! - DeepSeek
8//! - Galadriel
9//! - Gemini
10//! - Groq
11//! - Hugging Face
12//! - Hyperbolic
13//! - Llamafile
14//! - MiniMax
15//! - Mira
16//! - Mistral
17//! - Moonshot
18//! - Ollama
19//! - OpenAI
20//! - OpenRouter
21//! - Perplexity
22//! - Together
23//! - Voyage AI
24//! - xAI
25//! - Xiaomi MiMo
26//! - Z.ai
27//!
28//! Each provider module defines a `Client` type and model types for the
29//! capabilities it supports. Capability traits such as
30//! [`CompletionClient`](crate::client::CompletionClient) and
31//! [`EmbeddingsClient`](crate::client::EmbeddingsClient) are implemented only
32//! when the provider declares that capability.
33//!
34//! # Example
35//! ```no_run
36//! use rig_core::{
37//! agent::AgentBuilder,
38//! client::{CompletionClient, ProviderClient},
39//! providers::openai,
40//! };
41//!
42//! # fn run() -> Result<(), Box<dyn std::error::Error>> {
43//! // Initialize the OpenAI client
44//! let openai = openai::Client::from_env()?;
45//!
46//! // Create a model and initialize an agent
47//! let model = openai.completion_model(openai::GPT_5_2);
48//!
49//! let agent = AgentBuilder::new(model)
50//! .preamble("\
51//! You are Gandalf the white and you will be conversing with other \
52//! powerful beings to discuss the fate of Middle Earth.\
53//! ")
54//! .build();
55//!
56//! // Alternatively, you can initialize an agent directly
57//! let agent = openai.agent(openai::GPT_5_2)
58//! .preamble("\
59//! You are Gandalf the white and you will be conversing with other \
60//! powerful beings to discuss the fate of Middle Earth.\
61//! ")
62//! .build();
63//! # Ok(())
64//! # }
65//! ```
66pub mod anthropic;
67pub mod azure;
68pub mod chatgpt;
69pub mod cohere;
70pub mod copilot;
71pub mod deepseek;
72pub mod galadriel;
73pub mod gemini;
74pub mod groq;
75pub mod huggingface;
76pub mod hyperbolic;
77pub(crate) mod internal;
78pub mod llamafile;
79pub mod minimax;
80pub mod mira;
81pub mod mistral;
82pub mod moonshot;
83pub mod ollama;
84pub mod openai;
85pub mod openrouter;
86pub mod perplexity;
87pub mod together;
88pub mod voyageai;
89pub mod xai;
90pub mod xiaomimimo;
91pub mod zai;