1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Doubleword inference API client and Rig integration.
//!
//! [Doubleword](https://docs.doubleword.ai) is an OpenAI-compatible inference
//! provider. This integration covers the **realtime** tier: synchronous chat
//! completions and streaming via [`CompletionModel`], plus embeddings
//! ([`EmbeddingModel`]) on the same endpoint. Doubleword's two cheaper tiers
//! are separate mechanisms and Rig models neither: the **async** tier is the
//! same endpoints with `service_tier: "flex"` (plus `background: true` to
//! poll), while only the **batch** tier uses the OpenAI-compatible Batch API
//! (`/v1/batches`) with a JSONL upload.
//!
//! Set `DOUBLEWORD_API_KEY` (and optionally `DOUBLEWORD_BASE_URL`) to use
//! [`ProviderClient::from_env`](crate::client::ProviderClient::from_env).
//!
//! # Example
//! ```no_run
//! use rig_core::{
//! client::{CompletionClient, ProviderClient},
//! completion::CompletionModel,
//! providers::doubleword,
//! };
//!
//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let client = doubleword::Client::from_env()?;
//! let model = client.completion_model(doubleword::QWEN3_5_9B);
//! let request = model.completion_request("What is Rig?").build();
//! let response = model.completion(request).await?;
//! # let _ = response;
//! # Ok(())
//! # }
//! ```
pub use Client;
pub use *;
pub use *;