pub struct RagEngine<E, V>where
E: EmbeddingModel,
V: VectorStore,{ /* private fields */ }Implementations§
Source§impl<E, V> RagEngine<E, V>where
E: EmbeddingModel,
V: VectorStore,
impl<E, V> RagEngine<E, V>where
E: EmbeddingModel,
V: VectorStore,
pub fn new(embedding_model: E, vector_store: V, config: RagConfig) -> Self
pub fn with_config(self, config: RagConfig) -> Self
pub async fn index_documents( &self, documents: Vec<Document>, ) -> Result<usize, AiError>
pub async fn search( &self, query: &str, filter: Option<&str>, ) -> Result<Vec<RagSearchResult>, AiError>
pub async fn delete_document(&self, document_id: &str) -> Result<u64, AiError>
Auto Trait Implementations§
impl<E, V> Freeze for RagEngine<E, V>
impl<E, V> RefUnwindSafe for RagEngine<E, V>where
E: RefUnwindSafe,
V: RefUnwindSafe,
impl<E, V> Send for RagEngine<E, V>
impl<E, V> Sync for RagEngine<E, V>
impl<E, V> Unpin for RagEngine<E, V>
impl<E, V> UnsafeUnpin for RagEngine<E, V>where
E: UnsafeUnpin,
V: UnsafeUnpin,
impl<E, V> UnwindSafe for RagEngine<E, V>where
E: UnwindSafe,
V: UnwindSafe,
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