pub struct EmbedBuilder<M, V, Val> { /* private fields */ }Expand description
Builder for single value embedding
Implementations§
Source§impl<Val> EmbedBuilder<(), (), Val>
impl<Val> EmbedBuilder<(), (), Val>
Source§impl<M, V, Val> EmbedBuilder<M, V, Val>
impl<M, V, Val> EmbedBuilder<M, V, Val>
Sourcepub fn retry_policy(self, retry_policy: RetryPolicy) -> Self
pub fn retry_policy(self, retry_policy: RetryPolicy) -> Self
Set custom retry policy
Source§impl<V, Val> EmbedBuilder<(), V, Val>
impl<V, Val> EmbedBuilder<(), V, Val>
Sourcepub fn model<Mod: EmbeddingModel<Val> + 'static>(
self,
model: Mod,
) -> EmbedBuilder<Arc<dyn EmbeddingModel<Val>>, V, Val>
pub fn model<Mod: EmbeddingModel<Val> + 'static>( self, model: Mod, ) -> EmbedBuilder<Arc<dyn EmbeddingModel<Val>>, V, Val>
Set the embedding model
Source§impl<M, Val> EmbedBuilder<M, (), Val>
impl<M, Val> EmbedBuilder<M, (), Val>
Sourcepub fn value(self, value: Val) -> EmbedBuilder<M, Val, Val>
pub fn value(self, value: Val) -> EmbedBuilder<M, Val, Val>
Set the value to embed
Source§impl<Val> EmbedBuilder<Arc<dyn EmbeddingModel<Val>>, Val, Val>
impl<Val> EmbedBuilder<Arc<dyn EmbeddingModel<Val>>, Val, Val>
Sourcepub async fn execute(self) -> Result<EmbedResult<Val>>
pub async fn execute(self) -> Result<EmbedResult<Val>>
Execute the embedding
Trait Implementations§
Auto Trait Implementations§
impl<M, V, Val> Freeze for EmbedBuilder<M, V, Val>
impl<M, V, Val> RefUnwindSafe for EmbedBuilder<M, V, Val>
impl<M, V, Val> Send for EmbedBuilder<M, V, Val>
impl<M, V, Val> Sync for EmbedBuilder<M, V, Val>
impl<M, V, Val> Unpin for EmbedBuilder<M, V, Val>
impl<M, V, Val> UnwindSafe for EmbedBuilder<M, V, Val>
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