pub(crate) mod http;
pub mod errors;
pub use errors::GenaiError;
pub mod content;
pub use content::{
Annotation, CodeExecutionLanguage, Content, FileSearchResultItem, GoogleMapsResultItem,
GoogleSearchResultItem, Place, Resolution, ReviewSnippet, UrlContextResultItem,
};
pub mod steps;
pub use steps::{FunctionResultPayload, Step, StepDelta, StepError};
pub mod request;
pub use request::{
AgentConfig, DeepResearchConfig, DynamicConfig, GenerationConfig, ImageAspectRatio,
ImageConfig, ImageSize, InteractionInput, InteractionRequest, Role, ServiceTier, SpeechConfig,
ThinkingLevel, ThinkingSummaries, TurnContent, VideoConfig, VideoTask, Visualization,
};
pub mod response_format;
pub use response_format::{ResponseDelivery, ResponseFormat, ResponseFormatSpec};
pub mod environment;
pub use environment::{
AllowlistEntry, EnvironmentSource, EnvironmentSpec, NetworkConfig, RemoteEnvironment,
SourceType,
};
pub mod agents;
pub use agents::{Agent, AgentListResponse};
pub mod webhooks;
pub use webhooks::{
RevocationBehavior, RotateSigningSecretResponse, SigningSecret, Webhook, WebhookConfig,
WebhookEvent, WebhookListResponse, WebhookState, WebhookUpdate,
};
pub mod response;
pub use response::{
AudioInfo, CodeExecutionCallInfo, CodeExecutionResultInfo, FunctionCallInfo,
FunctionResultInfo, GoogleMapsResultInfo, GroundingToolCount, ImageInfo, InteractionResponse,
InteractionStatus, ModalityTokens, OwnedFunctionCallInfo, StepSummary, UrlContextResultInfo,
UsageMetadata,
};
pub mod tools;
pub use tools::{
AllowedTools, ComputerUseConfig, ExaAiSearchConfig, FileSearchConfig, FunctionCallingMode,
FunctionDeclaration, FunctionDeclarationBuilder, FunctionParameters, GoogleMapsConfig,
GoogleSearchConfig, HybridSearchConfig, McpServerConfig, ParallelAiSearchConfig, RagFilter,
RagRanking, RagResource, RagRetrievalConfig, RagStoreConfig, RetrievalConfig, RetrievalType,
SearchType, Tool, ToolChoice, VertexAiSearchConfig,
};
pub mod wire_streaming;
pub use wire_streaming::{InteractionStreamEvent, StreamChunk, StreamEvent, StreamMetadata};
pub mod wire;
#[cfg(feature = "antigravity")]
pub mod antigravity;
pub use http::files::{
DEFAULT_CHUNK_SIZE, FileError, FileMetadata, FileState, ListFilesResponse, ResumableUpload,
VideoMetadata,
};
pub mod client;
pub use client::{Client, ClientBuilder};
pub mod request_builder;
pub use request_builder::{ConversationBuilder, InteractionBuilder};
pub mod function_calling;
pub use function_calling::{CallableFunction, FunctionError, ToolService};
pub mod streaming;
pub use streaming::{
AutoFunctionResult, AutoFunctionResultAccumulator, AutoFunctionStreamChunk,
AutoFunctionStreamEvent, FunctionExecutionResult, PendingFunctionCall,
};
pub mod interactions_api;
pub mod multimodal;
pub use multimodal::{
audio_from_file, audio_from_file_with_mime, detect_mime_type, document_from_file,
document_from_file_with_mime, image_from_file, image_from_file_with_mime, video_from_file,
video_from_file_with_mime,
};
#[cfg(test)]
mod content_tests;
#[cfg(test)]
mod proptest_tests;
#[cfg(test)]
mod request_tests;
#[cfg(test)]
mod response_tests;
#[cfg(test)]
mod streaming_tests;
#[cfg(doctest)]
mod doc_tests {
use doc_comment::doc_comment;
doc_comment!(include_str!("../README.md"));
doc_comment!(include_str!("../TROUBLESHOOTING.md"));
doc_comment!(include_str!("../docs/AGENTS_AND_BACKGROUND.md"));
doc_comment!(include_str!("../docs/ANTIGRAVITY.md"));
doc_comment!(include_str!("../docs/BUILT_IN_TOOLS.md"));
doc_comment!(include_str!("../docs/CONFIGURATION.md"));
doc_comment!(include_str!("../docs/CONVERSATION_PATTERNS.md"));
doc_comment!(include_str!("../docs/ENUM_WIRE_FORMATS.md"));
doc_comment!(include_str!("../docs/ERROR_HANDLING.md"));
doc_comment!(include_str!("../docs/EXAMPLES_INDEX.md"));
doc_comment!(include_str!("../docs/FUNCTION_CALLING.md"));
doc_comment!(include_str!("../docs/LOGGING_STRATEGY.md"));
doc_comment!(include_str!("../docs/MULTI_TURN_FUNCTION_CALLING.md"));
doc_comment!(include_str!("../docs/MULTIMODAL.md"));
doc_comment!(include_str!("../docs/OUTPUT_MODALITIES.md"));
doc_comment!(include_str!("../docs/RELIABILITY_PATTERNS.md"));
doc_comment!(include_str!("../docs/STREAMING_API.md"));
doc_comment!(include_str!("../docs/TESTING.md"));
doc_comment!(include_str!("../docs/THINKING_MODE.md"));
}