pub struct Gemini { /* private fields */ }
Expand description
Client for the Gemini API
Implementations§
Source§impl Gemini
impl Gemini
Sourcepub fn with_model(api_key: impl Into<String>, model: String) -> Self
pub fn with_model(api_key: impl Into<String>, model: String) -> Self
Create a new client with the specified API key and model
Sourcepub fn with_base_url(api_key: impl Into<String>, base_url: String) -> Self
pub fn with_base_url(api_key: impl Into<String>, base_url: String) -> Self
Create a new client with custom base URL
Sourcepub fn with_model_and_base_url(
api_key: impl Into<String>,
model: String,
base_url: String,
) -> Self
pub fn with_model_and_base_url( api_key: impl Into<String>, model: String, base_url: String, ) -> Self
Create a new client with the specified API key, model, and base URL
Sourcepub fn generate_content(&self) -> ContentBuilder
pub fn generate_content(&self) -> ContentBuilder
Start building a content generation request
Sourcepub fn embed_content(&self) -> EmbedBuilder
pub fn embed_content(&self) -> EmbedBuilder
Start building a content generation request
Sourcepub fn batch_generate_content_sync(&self) -> BatchBuilder
pub fn batch_generate_content_sync(&self) -> BatchBuilder
Start building a synchronous batch content generation request
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Gemini
impl !RefUnwindSafe for Gemini
impl Send for Gemini
impl Sync for Gemini
impl Unpin for Gemini
impl !UnwindSafe for Gemini
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more