pub struct RagSearchOptions {
pub limit: usize,
pub min_similarity: f32,
pub filter_block_ids: Option<HashSet<BlockId>>,
pub filter_roles: Option<HashSet<String>>,
pub filter_tags: Option<HashSet<String>>,
pub include_content: bool,
}Expand description
Options for RAG search.
Fields§
§limit: usizeMaximum results to return.
min_similarity: f32Minimum similarity threshold (0.0 - 1.0).
filter_block_ids: Option<HashSet<BlockId>>Filter by block IDs (search only within these).
filter_roles: Option<HashSet<String>>Filter by semantic roles.
Filter by tags.
include_content: boolInclude content in results.
Implementations§
Source§impl RagSearchOptions
impl RagSearchOptions
pub fn new() -> Self
pub fn with_limit(self, limit: usize) -> Self
pub fn with_min_similarity(self, threshold: f32) -> Self
pub fn with_roles(self, roles: impl IntoIterator<Item = String>) -> Self
pub fn with_block_ids(self, ids: impl IntoIterator<Item = BlockId>) -> Self
Trait Implementations§
Source§impl Clone for RagSearchOptions
impl Clone for RagSearchOptions
Source§fn clone(&self) -> RagSearchOptions
fn clone(&self) -> RagSearchOptions
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 RagSearchOptions
impl Debug for RagSearchOptions
Source§impl Default for RagSearchOptions
impl Default for RagSearchOptions
Source§fn default() -> RagSearchOptions
fn default() -> RagSearchOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RagSearchOptions
impl RefUnwindSafe for RagSearchOptions
impl Send for RagSearchOptions
impl Sync for RagSearchOptions
impl Unpin for RagSearchOptions
impl UnwindSafe for RagSearchOptions
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