Skip to main content

rig_core/client/
mod.rs

1//! Provider clients and environment configuration helpers. A provider's
2//! client (such as [`crate::providers::openai::OpenAI`]) puts its
3//! configuration on a transport and builds the models it serves; each is
4//! re-exported from its provider module.
5//!
6//! ```no_run
7//! use rig_core::client::env;
8//!
9//! let credential = env::required("OPENAI_API_KEY")?;
10//! # let _ = credential;
11//! # Ok::<(), env::EnvError>(())
12//! ```
13
14pub(crate) mod anthropic;
15mod cached_content;
16pub(crate) mod cohere;
17pub(crate) mod copilot;
18pub mod env;
19pub(crate) mod gemini;
20pub(crate) mod gemini_caching;
21pub(crate) mod macros;
22pub(crate) mod ollama;
23pub(crate) mod openai;
24pub(crate) mod verify;
25pub(crate) mod voyageai;
26
27pub use env::EnvError;
28
29#[cfg(test)]
30mod tests;