Struct NarrativeResult
pub struct NarrativeResult {
pub narrative: String,
pub grounded: bool,
pub unmatched: Vec<String>,
pub model: String,
pub from_cache: bool,
}Expand description
The outcome of a narrate call: the narrative text, its groundedness
verdict and unmatched tokens, the model that produced it, and whether it was
served from the sidecar cache rather than freshly generated.
Fields§
§narrative: StringThe narrative text.
grounded: boolWhether every number the narrative quoted was grounded in the fact sheet.
unmatched: Vec<String>The numeric tokens that matched no fact value (empty iff grounded).
model: StringThe model id that produced (or previously produced) the narrative.
from_cache: boolWhether this result came from the cache rather than a fresh completion.
Trait Implementations§
§impl Clone for NarrativeResult
impl Clone for NarrativeResult
§fn clone(&self) -> NarrativeResult
fn clone(&self) -> NarrativeResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NarrativeResult
impl RefUnwindSafe for NarrativeResult
impl Send for NarrativeResult
impl Sync for NarrativeResult
impl Unpin for NarrativeResult
impl UnsafeUnpin for NarrativeResult
impl UnwindSafe for NarrativeResult
Blanket Implementations§
impl<T> Allocation for T
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Converts
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>
Converts
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