pub struct RetrieveOptions {
pub top_k: usize,
pub max_context_tokens: usize,
pub include_content: bool,
pub include_summaries: bool,
pub min_score: f32,
}Expand description
Options for retrieval operations.
Fields§
§top_k: usizeMaximum number of results to return.
max_context_tokens: usizeMaximum tokens for the context window.
include_content: boolWhether to include node content in results.
include_summaries: boolWhether to include node summaries in results.
min_score: f32Minimum relevance score (0.0 - 1.0).
Implementations§
Source§impl RetrieveOptions
impl RetrieveOptions
Sourcepub fn with_top_k(self, k: usize) -> Self
pub fn with_top_k(self, k: usize) -> Self
Set the maximum number of results.
Sourcepub fn with_max_context_tokens(self, tokens: usize) -> Self
pub fn with_max_context_tokens(self, tokens: usize) -> Self
Set the maximum context tokens.
Sourcepub fn with_content(self, include: bool) -> Self
pub fn with_content(self, include: bool) -> Self
Set whether to include content.
Sourcepub fn with_summaries(self, include: bool) -> Self
pub fn with_summaries(self, include: bool) -> Self
Set whether to include summaries.
Sourcepub fn with_min_score(self, score: f32) -> Self
pub fn with_min_score(self, score: f32) -> Self
Set the minimum relevance score.
Trait Implementations§
Source§impl Clone for RetrieveOptions
impl Clone for RetrieveOptions
Source§fn clone(&self) -> RetrieveOptions
fn clone(&self) -> RetrieveOptions
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 RetrieveOptions
impl Debug for RetrieveOptions
Auto Trait Implementations§
impl Freeze for RetrieveOptions
impl RefUnwindSafe for RetrieveOptions
impl Send for RetrieveOptions
impl Sync for RetrieveOptions
impl Unpin for RetrieveOptions
impl UnsafeUnpin for RetrieveOptions
impl UnwindSafe for RetrieveOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more