pub struct CustomProviderBuilder { /* private fields */ }Expand description
Builder of a CustomProvider.
Implementations§
Source§impl CustomProviderBuilder
impl CustomProviderBuilder
Sourcepub fn language_model(
self,
id: impl Into<String>,
model: impl Into<LanguageModelRef>,
) -> Self
pub fn language_model( self, id: impl Into<String>, model: impl Into<LanguageModelRef>, ) -> Self
Registers a language model under id.
Sourcepub fn embedding_model(
self,
id: impl Into<String>,
model: impl Into<EmbeddingModelRef>,
) -> Self
pub fn embedding_model( self, id: impl Into<String>, model: impl Into<EmbeddingModelRef>, ) -> Self
Registers an embedding model under id.
Sourcepub fn image_model(
self,
id: impl Into<String>,
model: impl Into<ImageModelRef>,
) -> Self
pub fn image_model( self, id: impl Into<String>, model: impl Into<ImageModelRef>, ) -> Self
Registers an image model under id.
Sourcepub fn transcription_model(
self,
id: impl Into<String>,
model: impl Into<TranscriptionModelRef>,
) -> Self
pub fn transcription_model( self, id: impl Into<String>, model: impl Into<TranscriptionModelRef>, ) -> Self
Registers a transcription model under id.
Sourcepub fn speech_model(
self,
id: impl Into<String>,
model: impl Into<SpeechModelRef>,
) -> Self
pub fn speech_model( self, id: impl Into<String>, model: impl Into<SpeechModelRef>, ) -> Self
Registers a speech model under id.
Sourcepub fn reranking_model(
self,
id: impl Into<String>,
model: impl Into<RerankingModelRef>,
) -> Self
pub fn reranking_model( self, id: impl Into<String>, model: impl Into<RerankingModelRef>, ) -> Self
Registers a reranking model under id.
Sourcepub fn video_model(
self,
id: impl Into<String>,
model: impl Into<VideoModelRef>,
) -> Self
pub fn video_model( self, id: impl Into<String>, model: impl Into<VideoModelRef>, ) -> Self
Registers a video model under id.
Sourcepub fn speech_translation_model(
self,
id: impl Into<String>,
model: impl Into<SpeechTranslationModelRef>,
) -> Self
pub fn speech_translation_model( self, id: impl Into<String>, model: impl Into<SpeechTranslationModelRef>, ) -> Self
Registers a speech translation model under id.
Sourcepub fn fallback(self, provider: ProviderRef) -> Self
pub fn fallback(self, provider: ProviderRef) -> Self
Delegates unknown ids (and services) to provider.
Sourcepub fn files(self, files: FilesRef) -> Self
pub fn files(self, files: FilesRef) -> Self
Sets the file service, taking precedence over the fallback provider.
Sourcepub fn skills(self, skills: SkillsRef) -> Self
pub fn skills(self, skills: SkillsRef) -> Self
Sets the skill service, taking precedence over the fallback provider.
Sourcepub fn build(self) -> CustomProvider
pub fn build(self) -> CustomProvider
Builds the provider.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CustomProviderBuilder
impl !UnwindSafe for CustomProviderBuilder
impl Freeze for CustomProviderBuilder
impl Send for CustomProviderBuilder
impl Sync for CustomProviderBuilder
impl Unpin for CustomProviderBuilder
impl UnsafeUnpin for CustomProviderBuilder
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