pub struct CustomProvider { /* private fields */ }Expand description
A provider that serves pre-built model instances, optionally falling back to another provider for unknown ids.
Trait Implementations§
Source§impl Clone for CustomProvider
impl Clone for CustomProvider
Source§fn clone(&self) -> CustomProvider
fn clone(&self) -> CustomProvider
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 CustomProvider
impl Debug for CustomProvider
Source§impl Provider for CustomProvider
impl Provider for CustomProvider
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 reranking_model(
&self,
model_id: &str,
) -> Result<RerankingModelRef, NoSuchModelError>
fn reranking_model( &self, model_id: &str, ) -> Result<RerankingModelRef, NoSuchModelError>
Returns the reranking 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 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 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.
Auto Trait Implementations§
impl !RefUnwindSafe for CustomProvider
impl !UnwindSafe for CustomProvider
impl Freeze for CustomProvider
impl Send for CustomProvider
impl Sync for CustomProvider
impl Unpin for CustomProvider
impl UnsafeUnpin for CustomProvider
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