Skip to main content

qai_sdk/
lib.rs

1//! # QAI SDK
2//!
3//! Universal Rust SDK for AI Providers.
4//!
5//! Provides a unified trait `LanguageModel` implemented across various AI providers.
6//!
7//! ## Features
8//! Enable the providers you need via Cargo features:
9//! - `openai`
10//! - `anthropic`
11//! - `google`
12//! - `deepseek`
13//! - `xai`
14//! - `openai-compatible`
15
16pub mod core;
17
18#[cfg(feature = "openai")]
19pub mod openai;
20
21#[cfg(feature = "anthropic")]
22pub mod anthropic;
23
24#[cfg(feature = "google")]
25pub mod google;
26
27#[cfg(feature = "deepseek")]
28pub mod deepseek;
29
30#[cfg(feature = "xai")]
31pub mod xai;
32
33#[cfg(feature = "openai-compatible")]
34pub mod openai_compatible;
35
36#[cfg(feature = "mcp")]
37pub mod mcp;
38
39#[cfg(test)]
40pub mod test_utils;
41
42pub use crate::core::types::*;
43pub use crate::core::*;
44
45// Export all providers if their features are enabled
46#[cfg(feature = "openai")]
47pub use crate::openai::create_openai;
48
49#[cfg(feature = "anthropic")]
50pub use crate::anthropic::create_anthropic;
51
52#[cfg(feature = "google")]
53pub use crate::google::create_google;
54
55#[cfg(feature = "deepseek")]
56pub use crate::deepseek::create_deepseek;
57
58#[cfg(feature = "xai")]
59pub use crate::xai::create_xai;
60
61#[cfg(feature = "openai-compatible")]
62pub use crate::openai_compatible::{create_openai_compatible, OpenAICompatibleProviderSettings};
63
64#[cfg(feature = "openai")]
65pub use crate::openai::OpenAIModel;
66
67#[cfg(feature = "anthropic")]
68pub use crate::anthropic::AnthropicModel;
69
70#[cfg(feature = "google")]
71pub use crate::google::GoogleModel;
72
73#[cfg(feature = "deepseek")]
74pub use crate::deepseek::DeepSeekModel;
75
76#[cfg(feature = "xai")]
77pub use crate::xai::XAIModel;
78
79#[cfg(feature = "openai-compatible")]
80pub use crate::openai_compatible::OpenAICompatibleModel;