pub struct RetrieveOptions {Show 13 fields
pub top_k: usize,
pub beam_width: usize,
pub max_iterations: usize,
pub include_content: bool,
pub include_summaries: bool,
pub min_score: f32,
pub strategy: StrategyPreference,
pub sufficiency_check: bool,
pub max_tokens: usize,
pub enable_cache: bool,
pub pruning_strategy: PruningStrategy,
pub token_estimation: TokenEstimation,
pub use_async_context: bool,
}Expand description
Options for retrieval operations.
Fields§
§top_k: usizeMaximum number of results to return.
beam_width: usizeBeam width for multi-path search.
max_iterations: usizeMaximum search iterations.
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).
strategy: StrategyPreferenceStrategy preference.
sufficiency_check: boolEnable sufficiency checking for incremental retrieval.
max_tokens: usizeMaximum tokens for sufficiency threshold.
enable_cache: boolEnable result caching.
pruning_strategy: PruningStrategyPruning strategy for context building.
token_estimation: TokenEstimationToken estimation mode.
use_async_context: boolWhether to use async context building for large documents.
Implementations§
Source§impl RetrieveOptions
impl RetrieveOptions
Sourcepub fn with_top_k(self, top_k: usize) -> Self
pub fn with_top_k(self, top_k: usize) -> Self
Set the maximum number of results to return.
Sourcepub fn with_beam_width(self, beam_width: usize) -> Self
pub fn with_beam_width(self, beam_width: usize) -> Self
Set the beam width for multi-path search.
Sourcepub fn with_max_iterations(self, max_iterations: usize) -> Self
pub fn with_max_iterations(self, max_iterations: usize) -> Self
Set the maximum search iterations.
Sourcepub fn with_include_content(self, include: bool) -> Self
pub fn with_include_content(self, include: bool) -> Self
Set whether to include node content in results.
Sourcepub fn with_include_summaries(self, include: bool) -> Self
pub fn with_include_summaries(self, include: bool) -> Self
Set whether to include node summaries in results.
Sourcepub fn with_min_score(self, min_score: f32) -> Self
pub fn with_min_score(self, min_score: f32) -> Self
Set the minimum relevance score.
Sourcepub fn with_strategy(self, strategy: StrategyPreference) -> Self
pub fn with_strategy(self, strategy: StrategyPreference) -> Self
Set the strategy preference.
Sourcepub fn with_sufficiency_check(self, enable: bool) -> Self
pub fn with_sufficiency_check(self, enable: bool) -> Self
Set whether to enable sufficiency checking.
Sourcepub fn with_max_tokens(self, max_tokens: usize) -> Self
pub fn with_max_tokens(self, max_tokens: usize) -> Self
Set the maximum tokens for sufficiency threshold.
Sourcepub fn with_enable_cache(self, enable: bool) -> Self
pub fn with_enable_cache(self, enable: bool) -> Self
Set whether to enable result caching.
Sourcepub fn with_pruning_strategy(self, strategy: PruningStrategy) -> Self
pub fn with_pruning_strategy(self, strategy: PruningStrategy) -> Self
Set pruning strategy for context building.
Sourcepub fn with_token_estimation(self, mode: TokenEstimation) -> Self
pub fn with_token_estimation(self, mode: TokenEstimation) -> Self
Set token estimation mode.
Sourcepub fn with_async_context(self, enable: bool) -> Self
pub fn with_async_context(self, enable: bool) -> Self
Enable async context building for large documents.
Trait Implementations§
Source§impl Clone for RetrieveOptions
impl Clone for RetrieveOptions
Source§fn clone(&self) -> RetrieveOptions
fn clone(&self) -> RetrieveOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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>
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>
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