pub struct FilesRetrievalTool { /* private fields */ }Expand description
Retrieval tool that searches through local text files.
Performs simple substring matching over file contents and returns relevant file chunks as retrieval results.
Implementations§
Source§impl FilesRetrievalTool
impl FilesRetrievalTool
Sourcepub fn with_chunk_size(self, size: usize) -> Self
pub fn with_chunk_size(self, size: usize) -> Self
Set the chunk size for splitting files.
Sourcepub fn with_chunk_overlap(self, overlap: usize) -> Self
pub fn with_chunk_overlap(self, overlap: usize) -> Self
Set the overlap between chunks.
Trait Implementations§
Source§impl BaseRetrievalTool for FilesRetrievalTool
impl BaseRetrievalTool for FilesRetrievalTool
Source§fn retrieve<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RetrievalResult>, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn retrieve<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RetrievalResult>, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search the corpus with a query and return ranked results.
Source§impl Clone for FilesRetrievalTool
impl Clone for FilesRetrievalTool
Source§fn clone(&self) -> FilesRetrievalTool
fn clone(&self) -> FilesRetrievalTool
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 moreAuto Trait Implementations§
impl Freeze for FilesRetrievalTool
impl RefUnwindSafe for FilesRetrievalTool
impl Send for FilesRetrievalTool
impl Sync for FilesRetrievalTool
impl Unpin for FilesRetrievalTool
impl UnwindSafe for FilesRetrievalTool
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