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
//! Google Gemini Provider
//!
//! This module provides integration with Google's Gemini AI models.
//!
//! # Architecture
//! - `client.rs` - Main Gemini client that aggregates all capabilities
//! - `types.rs` - Gemini-specific type definitions based on `OpenAPI` spec
//! - `chat.rs` - Chat completion capability implementation
//! - `models.rs` - Model listing capability implementation
//! - `files.rs` - File management capability implementation
//! - `code_execution.rs` - Code execution feature implementation
//! - `streaming.rs` - Streaming functionality with JSON buffering
//! - `embeddings.rs` - Text embedding capability implementation
//!
//! # Example Usage
//! ```rust,no_run
//! use siumai::prelude::*;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = LlmBuilder::new()
//! .gemini()
//! .api_key("your-api-key")
//! .model("gemini-1.5-flash")
//! .build()
//! .await?;
//!
//! // Use chat capability
//! let messages = vec![user!("Hello, world!")];
//! let response = client.chat_with_tools(messages, None).await?;
//!
//! Ok(())
//! }
//! ```
// Core modules
// Feature modules
// Re-export main types for convenience
pub use GeminiBuilder;
pub use GeminiChatCapability;
pub use GeminiClient;
pub use GeminiEmbeddings;
pub use GeminiFiles;
pub use GeminiModels;
pub use *;