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
//! OpenAI-Compatible Provider Interface
//!
//! This module provides model constants for OpenAI-compatible providers.
//! These providers now use the OpenAI client directly with custom base URLs.
//!
//! # Usage
//! ```rust,no_run
//! use siumai::prelude::*;
//! use siumai::providers::openai_compatible::{deepseek, openrouter};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // DeepSeek using OpenAI client with DeepSeek endpoint
//! let deepseek = LlmBuilder::new()
//! .deepseek()
//! .api_key("your-api-key")
//! .model(deepseek::REASONER) // Using model constant
//! .build()
//! .await?;
//!
//! // OpenRouter using OpenAI client with OpenRouter endpoint
//! let openrouter = LlmBuilder::new()
//! .openrouter()
//! .api_key("your-api-key")
//! .model(openrouter::openai::GPT_4) // Using model constant
//! .build()
//! .await?;
//!
//! // Other providers using OpenAI client with custom base URL
//! let groq = LlmBuilder::new()
//! .openai()
//! .base_url("https://api.groq.com/openai/v1")
//! .api_key("your-api-key")
//! .model("llama-3.1-70b-versatile")
//! .build()
//! .await?;
//!
//! Ok(())
//! }
//! ```
// New adapter system modules
// Re-export model constants for easy access
pub use ;
// Re-export new adapter system
pub use ;
pub use OpenAiCompatibleBuilder;
pub use ;
pub use OpenAiCompatibleClient;
pub use OpenAiCompatibleConfig;
pub use ;
pub use ;
// Test modules