pub struct HyDEConfig {
pub prompt_template: String,
pub k: usize,
pub include_original_query: bool,
}Expand description
HyDE configuration
Fields§
§prompt_template: StringPrompt used to generate the hypothetical document
k: usizeNumber of documents to retrieve
include_original_query: boolWhether to include the original query results
Implementations§
Source§impl HyDEConfig
impl HyDEConfig
Sourcepub fn with_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_prompt(self, prompt: impl Into<String>) -> Self
Sets the prompt template used to generate the hypothetical document
Sourcepub fn with_include_original_query(self, include: bool) -> Self
pub fn with_include_original_query(self, include: bool) -> Self
Sets whether to include the original query results
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HyDEConfig
impl RefUnwindSafe for HyDEConfig
impl Send for HyDEConfig
impl Sync for HyDEConfig
impl Unpin for HyDEConfig
impl UnsafeUnpin for HyDEConfig
impl UnwindSafe for HyDEConfig
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