pub struct GoogleInstance { /* private fields */ }Expand description
Provider implementation for Google’s Gemini AI models
Implementations§
Source§impl GoogleInstance
impl GoogleInstance
Sourcepub fn new(
api_key: String,
model: String,
supported_tasks: HashMap<String, TaskDefinition>,
enabled: bool,
) -> Self
pub fn new( api_key: String, model: String, supported_tasks: HashMap<String, TaskDefinition>, enabled: bool, ) -> Self
Creates a new Google provider instance
§Parameters
api_key- Google API keymodel- Default model to use (e.g. “gemini-pro”)supported_tasks- Map of tasks this provider supportsenabled- Whether this provider is enabled
Trait Implementations§
Source§impl LlmInstance for GoogleInstance
impl LlmInstance for GoogleInstance
Source§fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 LlmRequest,
) -> Pin<Box<dyn Future<Output = LlmResult<LlmResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 LlmRequest,
) -> Pin<Box<dyn Future<Output = LlmResult<LlmResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_supported_tasks(&self) -> &HashMap<String, TaskDefinition>
fn get_supported_tasks(&self) -> &HashMap<String, TaskDefinition>
Returns supported tasks for this provider
Source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Returns whether this provider is enabled
Auto Trait Implementations§
impl Freeze for GoogleInstance
impl !RefUnwindSafe for GoogleInstance
impl Send for GoogleInstance
impl Sync for GoogleInstance
impl Unpin for GoogleInstance
impl !UnwindSafe for GoogleInstance
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