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
//! Shared Gemini HTTP client (used by LLM Assistant, Totschool AI workers, etc.).
//!
//! Thin wrapper around the Google Generative Language API (`generateContent` and
//! `streamGenerateContent`). Serializes/deserializes Gemini REST shapes from [`types`],
//! handles SSE streaming merge via [`util`], and surfaces errors as [`GenaiError`].
//!
//! # Submodules
//!
//! - [`client`] — [`GenaiClient`] HTTP calls and the LLM Assistant system prompt
//! - [`types`] — request/response Content, Part, Tool, and function-calling types
//! - [`util`] — text extraction and streaming chunk merge helpers
//! - [`errors`] — [`GenaiError`] enum
//!
//! # Examples
//!
//! ```rust ignore
//! use lariv_rs::genai::{GenaiClient, Content, Role};
//!
//! let client = GenaiClient::from_env("gemini-2.0-flash");
//! let text = client
//! .generate_text("You are helpful.", "Summarize this document.")
//! .await?;
//!
//! // Multi-turn with tools:
//! let content = client
//! .generate_content(vec![Content::text(Role::User, "Hello")], 8192, &tool_decls)
//! .await?;
//! ```
pub use ;
pub use GenaiError;
pub use *;
pub use ;