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
//! `xAI` Provider Module
//!
//! Modular implementation of `xAI` API client with capability separation.
//! This module follows the design pattern of separating different AI capabilities
//! into distinct modules while providing a unified client interface.
//!
//! # Architecture
//! - `client.rs` - Main `xAI` client that aggregates all capabilities
//! - `config.rs` - Configuration structures and validation
//! - `builder.rs` - Builder pattern implementation for client creation
//! - `chat.rs` - Chat completion capability implementation
//! - `streaming.rs` - Streaming response capability implementation
//! - `types.rs` - xAI-specific type definitions
//! - `utils.rs` - Utility functions and helpers
//!
//! # Example Usage
//! ```rust,no_run
//! use siumai::models;
//! use siumai::prelude::*;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = Provider::xai()
//! .api_key("your-api-key")
//! .model(models::xai::GROK_3_LATEST)
//! .build()
//! .await?;
//!
//! // Use chat capability
//! let messages = vec![user!("Hello, world!")];
//! let response = client.chat(messages).await?;
//!
//! Ok(())
//! }
//! ```
// Core modules
// Capability modules
// Re-export main types for convenience
pub use XaiModels;
pub use ;
pub use XaiClient;
pub use XaiConfig;
pub use *;
// Re-export capability implementations
pub use XaiChatCapability;