pub struct ContextRequest {
pub q: String,
pub budget: Option<usize>,
pub max_results: Option<usize>,
pub include_metadata: Option<bool>,
pub smt_options: Option<Value>,
}
Expand description
Request for context assembly
Fields§
§q: String
Query for context assembly
budget: Option<usize>
Token budget for the assembled context
max_results: Option<usize>
Maximum number of documents to include
include_metadata: Option<bool>
Whether to include document metadata
smt_options: Option<Value>
SMT optimization parameters
Implementations§
Source§impl ContextRequest
impl ContextRequest
Sourcepub fn with_budget(self, budget: usize) -> Self
pub fn with_budget(self, budget: usize) -> Self
Set the token budget
Sourcepub fn with_max_results(self, max_results: usize) -> Self
pub fn with_max_results(self, max_results: usize) -> Self
Set the maximum number of results
Sourcepub fn with_metadata(self, include: bool) -> Self
pub fn with_metadata(self, include: bool) -> Self
Include document metadata in the response
Trait Implementations§
Source§impl Clone for ContextRequest
impl Clone for ContextRequest
Source§fn clone(&self) -> ContextRequest
fn clone(&self) -> ContextRequest
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 ContextRequest
impl Debug for ContextRequest
Source§impl<'de> Deserialize<'de> for ContextRequest
impl<'de> Deserialize<'de> for ContextRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContextRequest
impl RefUnwindSafe for ContextRequest
impl Send for ContextRequest
impl Sync for ContextRequest
impl Unpin for ContextRequest
impl UnwindSafe for ContextRequest
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