pub struct GeneratedHit {
pub score: u32,
pub generated: bool,
pub producer: String,
pub model: String,
pub kind: &'static str,
pub blob: String,
pub path: String,
pub snippet: Option<String>,
}Expand description
A hit in the generated channel: text a model produced about a media blob, never a graph fact.
It is deliberately not a SearchHit. A generated hit has no node, no
provenance and no key, and giving it a NodeSummary would be the first step
towards it being treated like one — the exact mistake ADR-0015 exists to
correct. Everything a consumer needs to label it is on the struct, including
the literal generated: true, so a caller that reads nothing else still
cannot mistake it for extracted text.
Fields§
§score: u32Relevance within the generated channel. Not comparable with a
SearchHit::score: the two are ranked by different scorers, in
different channels, on purpose.
generated: boolAlways true. A marker a consumer cannot miss or forget to check.
producer: StringThe producer identity that wrote the text — which model, at which
quantisation, under which prompt (see crate::Producer::id).
model: StringThe model’s registry name, repeated for legibility.
kind: &'static strThe modality (audio | vision).
blob: StringGit blob id of the source media.
path: StringRepository path the blob was seen at.
snippet: Option<String>A bounded, whitespace-collapsed excerpt of the generated text, on the same
terms as SearchHit::snippet.
Trait Implementations§
Source§impl Clone for GeneratedHit
impl Clone for GeneratedHit
Source§fn clone(&self) -> GeneratedHit
fn clone(&self) -> GeneratedHit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more