pub struct VecStoreOptions {
pub name_space: Option<String>,
pub score_threshold: Option<f32>,
pub filters: Option<Value>,
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<Value>
§embedder: Option<Arc<dyn Embedder>>
Implementations§
Source§impl VecStoreOptions
impl VecStoreOptions
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: Value) -> Self
pub fn with_embedder<E: Embedder + 'static>(self, embedder: E) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VecStoreOptions
impl !RefUnwindSafe for VecStoreOptions
impl Send for VecStoreOptions
impl Sync for VecStoreOptions
impl Unpin for VecStoreOptions
impl !UnwindSafe for VecStoreOptions
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
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