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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! Venice AI API client and Rig integration.
//!
//! [Venice](https://docs.venice.ai/overview/about-venice) is a privacy-focused
//! inference provider whose chat-completions endpoint is a drop-in replacement
//! for OpenAI's. This integration covers the capabilities Rig has traits for:
//!
//! - [`CompletionModel`] — chat completions, streaming, tools, vision, and
//! structured output, plus Venice's own [`VeniceParameters`] request block
//! (web search, thinking control, characters);
//! - [`EmbeddingModel`] — `POST /embeddings`;
//! - [`VeniceModelLister`] — `GET /models`;
//! - [`ImageGenerationModel`] — Venice's native `POST /image/generate`
//! (feature `image`);
//! - [`AudioGenerationModel`] — `POST /audio/speech` (feature `audio`);
//! - [`TranscriptionModel`] — `POST /audio/transcriptions`.
//!
//! Venice's video, image-editing, music, web-augmentation (`/augment/*`),
//! crypto-RPC, character, API-key and billing endpoints have no corresponding
//! Rig trait and are deliberately not wrapped here.
//!
//! Set `VENICE_API_KEY` (and optionally `VENICE_BASE_URL`) to use
//! [`ProviderClient::from_env`](crate::client::ProviderClient::from_env).
//!
//! # Example
//! ```no_run
//! use rig_core::{
//! client::{CompletionClient, ProviderClient},
//! completion::CompletionModel,
//! providers::venice,
//! };
//!
//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let client = venice::Client::from_env()?;
//! let model = client.completion_model(venice::QWEN3_5_9B);
//! let request = model.completion_request("What is Rig?").build();
//! let response = model.completion(request).await?;
//! # let _ = response;
//! # Ok(())
//! # }
//! ```
//!
//! # Venice-specific request parameters
//! ```no_run
//! use rig_core::client::{CompletionClient, ProviderClient};
//! use rig_core::completion::CompletionModel;
//! use rig_core::providers::venice;
//!
//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let client = venice::Client::from_env()?;
//! let model = client.completion_model(venice::QWEN3_5_9B);
//! let request = model
//! .completion_request("What shipped in Rust this month?")
//! .additional_params(
//! venice::VeniceParameters::new()
//! .enable_web_search(venice::WebSearchMode::Auto)
//! .enable_web_citations(true)
//! .into_additional_params(),
//! )
//! .build();
//!
//! // `raw_completion` keeps Venice's own blocks, including the citations
//! // web search returns.
//! let response = model.raw_completion(request).await?;
//! for citation in response.web_search_citations() {
//! println!("{} — {}", citation.title, citation.url);
//! }
//! # Ok(())
//! # }
//! ```
pub use *;
pub use ;
pub use *;
pub use *;
pub use *;
pub use *;