Struct langchain_rust::vectorstore::VecStoreOptions
source · 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