adk_model/lib.rs
1//! # adk-model
2//!
3//! LLM model integrations for ADK (Gemini, etc.).
4//!
5//! ## Overview
6//!
7//! This crate provides LLM implementations for ADK agents. Currently supports:
8//!
9//! - [`GeminiModel`] - Google's Gemini models (2.0 Flash, Pro, etc.)
10//! - [`MockLlm`] - Mock LLM for testing
11//!
12//! ## Quick Start
13//!
14//! ```rust,no_run
15//! use adk_model::GeminiModel;
16//! use std::sync::Arc;
17//!
18//! let api_key = std::env::var("GOOGLE_API_KEY").unwrap();
19//! let model = GeminiModel::new(&api_key, "gemini-2.0-flash-exp").unwrap();
20//!
21//! // Use with an agent
22//! // let agent = LlmAgentBuilder::new("assistant")
23//! // .model(Arc::new(model))
24//! // .build()?;
25//! ```
26//!
27//! ## Supported Models
28//!
29//! | Model | Description |
30//! |-------|-------------|
31//! | `gemini-2.0-flash-exp` | Fast, efficient model (recommended) |
32//! | `gemini-1.5-pro` | Most capable model |
33//! | `gemini-1.5-flash` | Balanced speed/capability |
34//!
35//! ## Features
36//!
37//! - Async streaming with backpressure
38//! - Tool/function calling support
39//! - Multimodal input (text, images, audio, video, PDF)
40//! - Generation configuration (temperature, top_p, etc.)
41
42pub mod gemini;
43pub mod mock;
44
45pub use gemini::GeminiModel;
46pub use mock::MockLlm;