pub struct NarrationRequest {
pub tone: ToneProfile,
pub locale: Locale,
pub user_text: Option<String>,
pub questions: Vec<AnswerTask>,
pub pending_questions: usize,
pub allowed_facts: Vec<NarratableFact>,
pub forbidden_claim_classes: Vec<ClaimClass>,
pub surrounding_receipts: Vec<ReceiptSummary>,
pub next_interaction_summary: Option<InteractionSummary>,
pub guidance: Vec<CaseGuidance>,
pub preceding_reply: Option<String>,
pub case_labels: Vec<CaseLabel>,
}Expand description
What the runtime asks a narrator model to produce (spec §18.3). The output is inserted around deterministic blocks, never trusted as the blocks themselves.
Fields§
§tone: ToneProfileVoice.
locale: LocaleLocale of the user.
user_text: Option<String>The user’s text, for acknowledgment.
questions: Vec<AnswerTask>Questions to answer.
Empty for the transition stage, and that is the point. A transition shown a question answers it — that is what a model does with a question in its context — so the user read the same explanation twice, once in the answer block and once in the acknowledgement above it, in two different wordings. Two increasingly explicit paragraphs of prompt did not hold, because a rule the model has to remember is not a rule.
The questions belong to the answer stage, which has them, writes one block each with its own basis and its own guard, and is the only stage that should be answering anything.
pending_questions: usizeHow many questions another block of this turn will answer.
What the transition stage gets instead of the questions themselves: it may need to know that an answer is coming — to leave room for it, or to not ask for something that is about to be explained — and the count says that without giving it anything to answer.
allowed_facts: Vec<NarratableFact>Facts that may be stated.
forbidden_claim_classes: Vec<ClaimClass>Claims that must not be made.
surrounding_receipts: Vec<ReceiptSummary>Receipts that will surround the narration.
next_interaction_summary: Option<InteractionSummary>The next card, if any.
guidance: Vec<CaseGuidance>What each workflow in view wants said, in the phase its case is in.
Server-authored, one per case, and empty for a deployment whose workflows say nothing. Before this the composer had no briefing at all, so everything a domain had to say about its own voice — ask one question at a time, do not restate a summary already on screen — reached the only stage with a voice not at all.
preceding_reply: Option<String>The reply that came just before this turn, when there was one.
§The one input a deictic question points at
The answer stage was built from the tasks, the facts, the forbidden classes and the receipts. The conversation was not in it, so a question whose subject is the previous assistant message reached a stage that could not see that message. Asked “in che senso?” about a sentence the assistant had just written, it had the three words, a pile of open obligations belonging to several records, and nothing about what had been asked — and told the user his own message was not specific enough.
One message rather than the window, and only the assistant’s. A question
about the antecedent almost always means the last thing said; the current
message is already here as Self::user_text; and handing this stage
the whole transcript is the shape that produces prose about whatever is
in front of it, which three earlier rounds were spent undoing.
Absent on the first turn of a conversation, and absent from the acknowledgement stage’s brief, which has no question to resolve.
case_labels: Vec<CaseLabel>What a person calls each case the brief mentions, as the directory labels it, so the stage that speaks to the user names a record as the user does. Server-authored, and only for cases the brief already carries: a label is what something is called, not a new subject to bring up.
Trait Implementations§
Source§impl Clone for NarrationRequest
impl Clone for NarrationRequest
Source§impl Debug for NarrationRequest
impl Debug for NarrationRequest
Source§impl<'de> Deserialize<'de> for NarrationRequest
impl<'de> Deserialize<'de> for NarrationRequest
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>,
impl Eq for NarrationRequest
Source§impl PartialEq for NarrationRequest
impl PartialEq for NarrationRequest
Source§impl Serialize for NarrationRequest
impl Serialize for NarrationRequest
impl StructuralPartialEq for NarrationRequest
Auto Trait Implementations§
impl Freeze for NarrationRequest
impl RefUnwindSafe for NarrationRequest
impl Send for NarrationRequest
impl Sync for NarrationRequest
impl Unpin for NarrationRequest
impl UnsafeUnpin for NarrationRequest
impl UnwindSafe for NarrationRequest
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.