pub struct GeminiIntegrationExample;Expand description
Example: Google Gemini integration workflow
Demonstrates how to:
- Use Google Gemini as an LLM provider
- Leverage cost-effective Gemini models
- Set up multi-provider fallback with Gemini
- Use Gemini for cost optimization
Implementations§
Source§impl GeminiIntegrationExample
impl GeminiIntegrationExample
Sourcepub async fn run_basic(api_key: &str) -> Result<()>
pub async fn run_basic(api_key: &str) -> Result<()>
Run the Gemini integration example with basic usage
Sourcepub async fn run_with_fallback(gemini_key: &str, openai_key: &str) -> Result<()>
pub async fn run_with_fallback(gemini_key: &str, openai_key: &str) -> Result<()>
Run example with multi-provider setup (Gemini + fallback)
Sourcepub async fn run_cost_optimized(_api_key: &str) -> Result<()>
pub async fn run_cost_optimized(_api_key: &str) -> Result<()>
Run example with cost-optimized routing using Gemini
Sourcepub async fn run_model_comparison(api_key: &str) -> Result<()>
pub async fn run_model_comparison(api_key: &str) -> Result<()>
Run example showing all Gemini model options
Auto Trait Implementations§
impl Freeze for GeminiIntegrationExample
impl RefUnwindSafe for GeminiIntegrationExample
impl Send for GeminiIntegrationExample
impl Sync for GeminiIntegrationExample
impl Unpin for GeminiIntegrationExample
impl UnwindSafe for GeminiIntegrationExample
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more