pub struct VecStoreOptions<F> {
pub name_space: Option<String>,
pub score_threshold: Option<f32>,
pub filters: Option<F>,
pub embedder: Option<Arc<dyn Embedder>>,
}Expand description
The VecStoreOptions struct is responsible for determining options when
interacting with a Vector Store. The options include name_space, score_threshold,
filters, and embedder.
§Usage
ⓘ
let options = VecStoreOptions::new()
.with_name_space("my_custom_namespace")
.with_score_threshold(0.5)
.with_filters(json!({"genre": "Sci-Fi"}))
.with_embedder(my_embedder);Fields§
§name_space: Option<String>§score_threshold: Option<f32>§filters: Option<F>§embedder: Option<Arc<dyn Embedder>>Implementations§
Source§impl<F> VecStoreOptions<F>
impl<F> VecStoreOptions<F>
pub fn new() -> Self
pub fn with_name_space<S: Into<String>>(self, name_space: S) -> Self
pub fn with_score_threshold(self, score_threshold: f32) -> Self
pub fn with_filters(self, filters: F) -> Self
pub fn with_embedder<E: Embedder + 'static>(self, embedder: E) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<F> !RefUnwindSafe for VecStoreOptions<F>
impl<F> !UnwindSafe for VecStoreOptions<F>
impl<F> Freeze for VecStoreOptions<F>
impl<F> Send for VecStoreOptions<F>
impl<F> Sync for VecStoreOptions<F>
impl<F> Unpin for VecStoreOptions<F>
impl<F> UnsafeUnpin for VecStoreOptions<F>where
Option<F>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more