pub struct PersistentVectorStore { /* private fields */ }Expand description
Persistent vector store backed by SQLite
Implementations§
Source§impl PersistentVectorStore
impl PersistentVectorStore
Sourcepub fn new<P: AsRef<Path>>(path: P, dimension: usize) -> Result<Self>
pub fn new<P: AsRef<Path>>(path: P, dimension: usize) -> Result<Self>
Create or open a persistent vector store
Sourcepub fn add_document(
&self,
id: &str,
file_path: &str,
source: &str,
metadata: Option<&str>,
embedding: &[f32],
) -> Result<()>
pub fn add_document( &self, id: &str, file_path: &str, source: &str, metadata: Option<&str>, embedding: &[f32], ) -> Result<()>
Add a document with its embedding and file path
Sourcepub fn add_document_with_spool(
&self,
id: &str,
file_path: &str,
source: &str,
metadata: Option<&str>,
spool_offset: Option<u64>,
spool_length: Option<u32>,
embedding: &[f32],
) -> Result<()>
pub fn add_document_with_spool( &self, id: &str, file_path: &str, source: &str, metadata: Option<&str>, spool_offset: Option<u64>, spool_length: Option<u32>, embedding: &[f32], ) -> Result<()>
Add a document with spool location
Auto Trait Implementations§
impl Freeze for PersistentVectorStore
impl RefUnwindSafe for PersistentVectorStore
impl Send for PersistentVectorStore
impl Sync for PersistentVectorStore
impl Unpin for PersistentVectorStore
impl UnsafeUnpin for PersistentVectorStore
impl UnwindSafe for PersistentVectorStore
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