Files
geologia/src/lib.rs
Andre Cipriani Bandarra 414299cdc7 Add Apache 2.0 license
- Add LICENSE file with Apache 2.0 text
- Add license field to Cargo.toml
- Add copyright and SPDX headers to all source files
- Add License section to README.md
2026-04-18 08:07:11 +01:00

42 lines
1.2 KiB
Rust

// Copyright 2026 Andre Cipriani Bandarra
// SPDX-License-Identifier: Apache-2.0
//! Async Rust client for the Google Gemini API.
//!
//! This crate provides a high-level async client for interacting with Google's Gemini
//! generative AI models. It supports content generation (including streaming via SSE),
//! token counting, text embeddings, and image generation.
//!
//! # Usage
//!
//! ```no_run
//! use geologia::prelude::*;
//!
//! # async fn run() -> geologia::error::Result<()> {
//! let client = GeminiClient::new("YOUR_API_KEY".into());
//!
//! let request = GenerateContentRequest::builder()
//! .contents(vec![
//! Content::builder().add_text_part("Hello, Gemini!").build()
//! ])
//! .build();
//!
//! let response = client.generate_content(&request, "gemini-2.0-flash").await?;
//! # Ok(())
//! # }
//! ```
mod client;
pub mod error;
pub mod network;
mod types;
/// Convenience re-exports of the most commonly used types.
///
/// Importing `use geologia::prelude::*` brings [`GeminiClient`](crate::prelude::GeminiClient)
/// and all request/response types into scope.
pub mod prelude {
pub use crate::client::*;
pub use crate::types::*;
}