Skip to main content

gemini_rust/
prelude.rs

1//! # Gemini Rust SDK Prelude
2//!
3//! This module provides convenient imports for the most commonly used types
4//! in the Gemini Rust SDK. Import everything with:
5//!
6//! ```rust
7//! use gemini_rust::prelude::*;
8//! ```
9//!
10//! This prelude includes only the essential types that most users will need.
11//! For more specialized types, import them directly from the crate root or
12//! their respective modules.
13
14// Core client types
15pub use crate::{ClientError, Gemini, Model};
16
17// Builders for creating requests
18#[allow(deprecated)]
19pub use crate::{ContentBuilder, EmbedBuilder};
20
21// Core data types for messages and content
22pub use crate::{Content, FileData, Message, Role};
23
24// Main response types
25#[allow(deprecated)]
26pub use crate::{ContentEmbeddingResponse, CountTokensResponse, GenerationResponse};
27
28// Configuration types
29#[allow(deprecated)]
30pub use crate::{GenerationConfig, TaskType};
31
32// Safety settings
33pub use crate::{HarmBlockThreshold, HarmCategory, SafetySetting};
34
35// Function calling
36pub use crate::{FunctionDeclaration, FunctionResponse, Tool};
37
38// Batch and file handles (commonly used for async operations)
39pub use crate::{Batch, FileHandle};
40
41// File Search for RAG
42pub use crate::{
43    ChunkingConfig, CustomMetadata, CustomMetadataValue, DocumentHandle, FileSearchStoreHandle,
44    OperationHandle, WhiteSpaceConfig,
45};
46
47// Interactions API — the modern way to use Gemini
48pub use crate::{
49    AgentConfig, AllowedTools, Annotation, AspectRatio, AudioMimeType, AudioOutputMimeType,
50    CodeExecutionCallArguments, CodeLanguage, DeliveryMode, DocumentMimeType, EnvironmentConfig,
51    EnvironmentConfigOrString, EnvironmentSource, GoogleSearchType, ImageMimeType,
52    ImageOutputMimeType, ImageSize, Interaction, InteractionBuilder, InteractionContent,
53    InteractionEvent, InteractionGenerationConfig, InteractionHandle, InteractionInput,
54    InteractionSpeechConfig, InteractionStatus, InteractionStream, InteractionThinkingLevel,
55    InteractionTool, InteractionUsage, MediaResolution, ResponseFormat, ResponseModality,
56    ServiceTier, Step, StepDeltaData, StepResult, TextMimeType, ThinkingSummaries,
57    ThoughtSummaryContent, ToolChoiceConfig, VideoAspectRatio, VideoConfig, VideoMimeType,
58    Visualization, WebhookConfig,
59};