pub struct SynthesisResult {
pub synthesis: Value,
pub page_contributions: Vec<PageContribution>,
pub confidence: f64,
pub pages_used: usize,
pub tokens_used: usize,
pub duration_ms: u64,
}Expand description
Result of multi-page synthesis.
Fields§
§synthesis: ValueThe synthesized output.
page_contributions: Vec<PageContribution>Contribution from each page.
confidence: f64Overall confidence in the synthesis.
pages_used: usizeNumber of pages used.
tokens_used: usizeToken usage for the synthesis.
duration_ms: u64Duration in milliseconds.
Implementations§
Source§impl SynthesisResult
impl SynthesisResult
Sourcepub fn with_contributions(self, contributions: Vec<PageContribution>) -> Self
pub fn with_contributions(self, contributions: Vec<PageContribution>) -> Self
Add page contributions.
Sourcepub fn with_tokens(self, tokens: usize) -> Self
pub fn with_tokens(self, tokens: usize) -> Self
Set token usage.
Sourcepub fn with_duration(self, ms: u64) -> Self
pub fn with_duration(self, ms: u64) -> Self
Set duration.
Sourcepub fn significant_contributors(
&self,
min_contribution: f64,
) -> Vec<&PageContribution>
pub fn significant_contributors( &self, min_contribution: f64, ) -> Vec<&PageContribution>
Get pages that contributed significantly.
Trait Implementations§
Source§impl Clone for SynthesisResult
impl Clone for SynthesisResult
Source§fn clone(&self) -> SynthesisResult
fn clone(&self) -> SynthesisResult
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 SynthesisResult
impl Debug for SynthesisResult
Source§impl<'de> Deserialize<'de> for SynthesisResult
impl<'de> Deserialize<'de> for SynthesisResult
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 SynthesisResult
impl RefUnwindSafe for SynthesisResult
impl Send for SynthesisResult
impl Sync for SynthesisResult
impl Unpin for SynthesisResult
impl UnwindSafe for SynthesisResult
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