pub struct ContextualConfig {
pub prompt_template: String,
pub max_concurrency: usize,
}Expand description
Contextual Retrieval configuration.
Fields§
§prompt_template: StringPrompt template; {chunk} is replaced with the chunk text.
max_concurrency: usizeMax LLM calls in flight (index-cost cap).
Implementations§
Source§impl ContextualConfig
impl ContextualConfig
Sourcepub fn with_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_prompt(self, prompt: impl Into<String>) -> Self
Sets the prompt template ({chunk} placeholder required).
Sourcepub fn with_max_concurrency(self, max_concurrency: usize) -> Self
pub fn with_max_concurrency(self, max_concurrency: usize) -> Self
Sets the max in-flight context-generation calls.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContextualConfig
impl RefUnwindSafe for ContextualConfig
impl Send for ContextualConfig
impl Sync for ContextualConfig
impl Unpin for ContextualConfig
impl UnsafeUnpin for ContextualConfig
impl UnwindSafe for ContextualConfig
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