pub struct VectorStoreConfig {
pub dim: usize,
pub metric: DistanceMetric,
pub index_config: VectorIndexConfig,
}Expand description
Vector store configuration
Fields§
§dim: usizeEmbedding dimension
metric: DistanceMetricDistance metric
index_config: VectorIndexConfigIndex configuration
Implementations§
Source§impl VectorStoreConfig
impl VectorStoreConfig
Sourcepub fn sentence_transformers() -> Self
pub fn sentence_transformers() -> Self
Create config for sentence-transformers (384 dim)
Sourcepub fn custom(dim: usize, metric: DistanceMetric) -> Self
pub fn custom(dim: usize, metric: DistanceMetric) -> Self
Create config for custom dimension
Trait Implementations§
Source§impl Clone for VectorStoreConfig
impl Clone for VectorStoreConfig
Source§fn clone(&self) -> VectorStoreConfig
fn clone(&self) -> VectorStoreConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 VectorStoreConfig
impl Debug for VectorStoreConfig
Source§impl<'de> Deserialize<'de> for VectorStoreConfig
impl<'de> Deserialize<'de> for VectorStoreConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VectorStoreConfig
impl RefUnwindSafe for VectorStoreConfig
impl Send for VectorStoreConfig
impl Sync for VectorStoreConfig
impl Unpin for VectorStoreConfig
impl UnwindSafe for VectorStoreConfig
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