pub struct GoogleProvider { /* private fields */ }Expand description
The Google provider: a factory for the models and services.
Implementations§
Source§impl GoogleProvider
impl GoogleProvider
Sourcepub fn from_config(config: SharedConfig) -> Self
pub fn from_config(config: SharedConfig) -> Self
Creates a provider from a shared configuration.
Sourcepub fn config(&self) -> &SharedConfig
pub fn config(&self) -> &SharedConfig
Shared configuration.
Sourcepub fn language_model(&self, model_id: &str) -> GoogleLanguageModel
pub fn language_model(&self, model_id: &str) -> GoogleLanguageModel
Gemini language model (generateContent).
Sourcepub fn interactions(&self, model_id: &str) -> GoogleInteractionsLanguageModel
pub fn interactions(&self, model_id: &str) -> GoogleInteractionsLanguageModel
Interactions language model, with stateful conversations and background agents.
Sourcepub fn chat(&self, model_id: &str) -> GoogleLanguageModel
pub fn chat(&self, model_id: &str) -> GoogleLanguageModel
Alias of Self::language_model.
Sourcepub fn embedding(&self, model_id: &str) -> GoogleEmbeddingModel
pub fn embedding(&self, model_id: &str) -> GoogleEmbeddingModel
Embedding model (embedContent / batchEmbedContents).
Sourcepub fn text_embedding(&self, model_id: &str) -> GoogleEmbeddingModel
pub fn text_embedding(&self, model_id: &str) -> GoogleEmbeddingModel
Alias of Self::embedding.
Sourcepub fn image(&self, model_id: &str) -> GoogleImageModel
pub fn image(&self, model_id: &str) -> GoogleImageModel
Gemini image model (generateContent with the IMAGE modality).
Sourcepub fn speech(&self, model_id: &str) -> GoogleSpeechModel
pub fn speech(&self, model_id: &str) -> GoogleSpeechModel
Speech (text-to-speech) model.
Sourcepub fn speech_translation(&self, model_id: &str) -> GoogleSpeechTranslationModel
pub fn speech_translation(&self, model_id: &str) -> GoogleSpeechTranslationModel
Live speech translation model.
Sourcepub fn transcription(&self, model_id: &str) -> GoogleTranscriptionModel
pub fn transcription(&self, model_id: &str) -> GoogleTranscriptionModel
Transcription model (Interactions API).
Sourcepub fn video(&self, model_id: &str) -> GoogleVideoModel
pub fn video(&self, model_id: &str) -> GoogleVideoModel
Veo video model.
Sourcepub fn files(&self) -> GoogleFiles
pub fn files(&self) -> GoogleFiles
Files API service.
Sourcepub fn batch(&self) -> GoogleBatch
pub fn batch(&self) -> GoogleBatch
Batch generation service.
Sourcepub fn realtime(&self) -> GoogleRealtimeFactory
pub fn realtime(&self) -> GoogleRealtimeFactory
Live API factory (session tokens and event mapping).
Sourcepub fn tools(&self) -> &GoogleTools
pub fn tools(&self) -> &GoogleTools
Provider-executed tool factories.
Trait Implementations§
Source§impl Clone for GoogleProvider
impl Clone for GoogleProvider
Source§fn clone(&self) -> GoogleProvider
fn clone(&self) -> GoogleProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GoogleProvider
impl Debug for GoogleProvider
Source§impl Provider for GoogleProvider
impl Provider for GoogleProvider
Source§fn provider_id(&self) -> &ProviderId
fn provider_id(&self) -> &ProviderId
Provider identifier, for example
openai.Source§fn language_model(
&self,
model_id: &str,
) -> Result<LanguageModelRef, NoSuchModelError>
fn language_model( &self, model_id: &str, ) -> Result<LanguageModelRef, NoSuchModelError>
Returns the language model with
model_id. Read moreSource§fn embedding_model(
&self,
model_id: &str,
) -> Result<EmbeddingModelRef, NoSuchModelError>
fn embedding_model( &self, model_id: &str, ) -> Result<EmbeddingModelRef, NoSuchModelError>
Returns the embedding model with
model_id. Read moreSource§fn image_model(&self, model_id: &str) -> Result<ImageModelRef, NoSuchModelError>
fn image_model(&self, model_id: &str) -> Result<ImageModelRef, NoSuchModelError>
Returns the image model with
model_id. Read moreSource§fn transcription_model(
&self,
model_id: &str,
) -> Result<TranscriptionModelRef, NoSuchModelError>
fn transcription_model( &self, model_id: &str, ) -> Result<TranscriptionModelRef, NoSuchModelError>
Returns the transcription model with
model_id. Read moreSource§fn speech_model(
&self,
model_id: &str,
) -> Result<SpeechModelRef, NoSuchModelError>
fn speech_model( &self, model_id: &str, ) -> Result<SpeechModelRef, NoSuchModelError>
Returns the speech model with
model_id. Read moreSource§fn speech_translation_model(
&self,
model_id: &str,
) -> Result<SpeechTranslationModelRef, NoSuchModelError>
fn speech_translation_model( &self, model_id: &str, ) -> Result<SpeechTranslationModelRef, NoSuchModelError>
Returns the speech translation model with
model_id. Read moreSource§fn video_model(&self, model_id: &str) -> Result<VideoModelRef, NoSuchModelError>
fn video_model(&self, model_id: &str) -> Result<VideoModelRef, NoSuchModelError>
Returns the video model with
model_id. Read moreSource§fn realtime(&self) -> Option<RealtimeFactoryRef>
fn realtime(&self) -> Option<RealtimeFactoryRef>
Returns the realtime factory, if the provider supports realtime sessions.
Source§fn files(&self) -> Option<FilesRef>
fn files(&self) -> Option<FilesRef>
Returns the files service, if the provider supports file storage.
Source§fn batch(&self) -> Option<BatchRef>
fn batch(&self) -> Option<BatchRef>
Returns the batch service, if the provider supports batch jobs.
Source§fn reranking_model(
&self,
model_id: &str,
) -> Result<ModelRef<dyn DynRerankingModel>, NoSuchModelError>
fn reranking_model( &self, model_id: &str, ) -> Result<ModelRef<dyn DynRerankingModel>, NoSuchModelError>
Returns the reranking model with
model_id. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for GoogleProvider
impl !UnwindSafe for GoogleProvider
impl Freeze for GoogleProvider
impl Send for GoogleProvider
impl Sync for GoogleProvider
impl Unpin for GoogleProvider
impl UnsafeUnpin for GoogleProvider
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