pub struct DefaultEmbeddingSettings { /* private fields */ }Expand description
Middleware created by default_embedding_settings.
Implementations§
Source§impl DefaultEmbeddingSettings
impl DefaultEmbeddingSettings
Sourcepub fn apply(&self, options: EmbedOptions) -> EmbedOptions
pub fn apply(&self, options: EmbedOptions) -> EmbedOptions
Applies the defaults to options.
Trait Implementations§
Source§impl Clone for DefaultEmbeddingSettings
impl Clone for DefaultEmbeddingSettings
Source§fn clone(&self) -> DefaultEmbeddingSettings
fn clone(&self) -> DefaultEmbeddingSettings
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 DefaultEmbeddingSettings
impl Debug for DefaultEmbeddingSettings
Source§impl EmbeddingModelMiddleware for DefaultEmbeddingSettings
impl EmbeddingModelMiddleware for DefaultEmbeddingSettings
Source§fn transform_params<'a>(
&'a self,
options: EmbedOptions,
_ctx: EmbeddingMiddlewareContext<'a>,
) -> BoxFuture<'a, Result<EmbedOptions, ProviderError>>
fn transform_params<'a>( &'a self, options: EmbedOptions, _ctx: EmbeddingMiddlewareContext<'a>, ) -> BoxFuture<'a, Result<EmbedOptions, ProviderError>>
Rewrites the embed options before the call.
Source§fn wrap_embed<'a>(
&'a self,
options: EmbedOptions,
next: EmbedNext<'a>,
_ctx: EmbeddingMiddlewareContext<'a>,
) -> BoxFuture<'a, Result<EmbedResult, ProviderError>>
fn wrap_embed<'a>( &'a self, options: EmbedOptions, next: EmbedNext<'a>, _ctx: EmbeddingMiddlewareContext<'a>, ) -> BoxFuture<'a, Result<EmbedResult, ProviderError>>
Wraps
do_embed.Source§fn override_provider(
&self,
_model: &dyn DynEmbeddingModel,
) -> Option<ProviderId>
fn override_provider( &self, _model: &dyn DynEmbeddingModel, ) -> Option<ProviderId>
Overrides the provider id reported by the wrapped model.
Source§fn override_model_id(&self, _model: &dyn DynEmbeddingModel) -> Option<ModelId>
fn override_model_id(&self, _model: &dyn DynEmbeddingModel) -> Option<ModelId>
Overrides the model id reported by the wrapped model.
Source§fn max_embeddings_per_call(
&self,
model: &dyn DynEmbeddingModel,
) -> Option<usize>
fn max_embeddings_per_call( &self, model: &dyn DynEmbeddingModel, ) -> Option<usize>
The batch limit reported by the wrapper; defaults to the inner value.
Source§fn max_input_bytes_per_call(
&self,
model: &dyn DynEmbeddingModel,
) -> Option<usize>
fn max_input_bytes_per_call( &self, model: &dyn DynEmbeddingModel, ) -> Option<usize>
The input byte limit reported by the wrapper; defaults to the inner
value.
Source§fn supports_parallel_calls(&self, model: &dyn DynEmbeddingModel) -> bool
fn supports_parallel_calls(&self, model: &dyn DynEmbeddingModel) -> bool
Whether the wrapper allows concurrent calls; defaults to the inner
value.
Auto Trait Implementations§
impl Freeze for DefaultEmbeddingSettings
impl RefUnwindSafe for DefaultEmbeddingSettings
impl Send for DefaultEmbeddingSettings
impl Sync for DefaultEmbeddingSettings
impl Unpin for DefaultEmbeddingSettings
impl UnsafeUnpin for DefaultEmbeddingSettings
impl UnwindSafe for DefaultEmbeddingSettings
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