pub struct OllamaIntegrationExample;Expand description
Example: Ollama Integration (Local LLM Execution)
This example demonstrates how to use Ollama for local LLM execution, including model selection, hybrid setups, and cost comparison.
Implementations§
Source§impl OllamaIntegrationExample
impl OllamaIntegrationExample
Sourcepub async fn run_basic_usage() -> Result<()>
pub async fn run_basic_usage() -> Result<()>
Run basic Ollama usage example
Sourcepub async fn model_selection_guide() -> Result<()>
pub async fn model_selection_guide() -> Result<()>
Model selection guide
Sourcepub async fn hybrid_setup_example(_openai_key: &str) -> Result<()>
pub async fn hybrid_setup_example(_openai_key: &str) -> Result<()>
Hybrid setup with cloud fallback
Sourcepub async fn cost_comparison() -> Result<()>
pub async fn cost_comparison() -> Result<()>
Cost comparison: Ollama vs Cloud
Sourcepub async fn installation_guide() -> Result<()>
pub async fn installation_guide() -> Result<()>
Installation and setup guide
Sourcepub async fn environment_config_example() -> Result<()>
pub async fn environment_config_example() -> Result<()>
Environment-based configuration
Auto Trait Implementations§
impl Freeze for OllamaIntegrationExample
impl RefUnwindSafe for OllamaIntegrationExample
impl Send for OllamaIntegrationExample
impl Sync for OllamaIntegrationExample
impl Unpin for OllamaIntegrationExample
impl UnwindSafe for OllamaIntegrationExample
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