#[non_exhaustive]pub struct CompositionInput<'a> {Show 25 fields
pub turn: &'a TurnInput,
pub attachments: Vec<ContentPart>,
pub answer_tasks: &'a [AnswerTask],
pub events: &'a [EventBatch],
pub ledger: &'a [LedgerReceiptGroup],
pub interactions: &'a [Interaction],
pub views: &'a [ErasedWorkflowView],
pub subjects: &'a [CaseKey],
pub touched: &'a [CaseKey],
pub beside: &'a [CaseKey],
pub reachable_only: &'a [CaseKey],
pub recent: &'a [RecentMessage],
pub preceding_reply: Option<&'a str>,
pub artifacts_shown: &'a [BlockId],
pub case_labels: &'a [CaseLabel],
pub next_steps: &'a [(CaseKey, Vec<LocalizedText>)],
pub named_workflows: &'a [WorkflowKey],
pub unavailable: &'a [UnavailableWorkflow],
pub disputes: &'a [String],
pub started: &'a [WorkflowKey],
pub contested: &'a [String],
pub notices: &'a [ServerNotice],
pub refusals: &'a [NarratableFact],
pub outcomes: OutcomeFlags,
pub effort: Option<&'a EffortProfile>,
}Expand description
Everything one composition reads.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.turn: &'a TurnInputThe turn being answered.
attachments: Vec<ContentPart>The turn’s files, for the stage that answers.
answer_tasks: &'a [AnswerTask]The questions the reducer produced, with their basis.
events: &'a [EventBatch]Event batches that committed, in commit order.
ledger: &'a [LedgerReceiptGroup]Ledger groups read back from the journal, used instead of Self::events
when a response is regenerated: a stored event may have been redacted since.
interactions: &'a [Interaction]Cards on screen after the turn.
views: &'a [ErasedWorkflowView]The cases as they now stand.
subjects: &'a [CaseKey]The cases the turn was about.
touched: &'a [CaseKey]The cases an act of the turn reached, in act order: where the ask comes from.
beside: &'a [CaseKey]Other cases in view the ask may move on to once the touched ones need nothing.
reachable_only: &'a [CaseKey]Cases in view only because the actor may reach them.
recent: &'a [RecentMessage]The earlier messages, oldest first.
preceding_reply: Option<&'a str>The reply just before this turn.
artifacts_shown: &'a [BlockId]Artifact blocks the conversation already carries.
case_labels: &'a [CaseLabel]What each case is called.
next_steps: &'a [(CaseKey, Vec<LocalizedText>)]What each case lets the user do next once it owes nothing, by case.
named_workflows: &'a [WorkflowKey]Workflows the turn named.
Workflows that cannot start, with their reasons.
disputes: &'a [String]What the user said the assistant got wrong.
started: &'a [WorkflowKey]Workflows the turn started without writing anything yet.
contested: &'a [String]Receipts of the last reply the user contested, as they were shown.
notices: &'a [ServerNotice]Notices the turn already carries.
refusals: &'a [NarratableFact]What the reduction and the execution decided, as facts.
outcomes: OutcomeFlagsDeterministic outcome flags.
effort: Option<&'a EffortProfile>The effort the turn runs at: its reply budget and task profiles.
Implementations§
Source§impl<'a> CompositionInput<'a>
impl<'a> CompositionInput<'a>
Source§impl<'a> CompositionInput<'a>
impl<'a> CompositionInput<'a>
Sourcepub fn with_attachments(self, value: Vec<ContentPart>) -> Self
pub fn with_attachments(self, value: Vec<ContentPart>) -> Self
Sets the turn’s files.
Sourcepub fn with_answer_tasks(self, value: &'a [AnswerTask]) -> Self
pub fn with_answer_tasks(self, value: &'a [AnswerTask]) -> Self
Sets the questions.
Sourcepub fn with_events(self, value: &'a [EventBatch]) -> Self
pub fn with_events(self, value: &'a [EventBatch]) -> Self
Sets the committed events.
Sourcepub fn with_ledger(self, value: &'a [LedgerReceiptGroup]) -> Self
pub fn with_ledger(self, value: &'a [LedgerReceiptGroup]) -> Self
Sets the ledger groups of a regenerated response.
Sourcepub fn with_interactions(self, value: &'a [Interaction]) -> Self
pub fn with_interactions(self, value: &'a [Interaction]) -> Self
Sets the cards on screen.
Sourcepub fn with_views(self, value: &'a [ErasedWorkflowView]) -> Self
pub fn with_views(self, value: &'a [ErasedWorkflowView]) -> Self
Sets the views.
Sourcepub fn with_subjects(self, value: &'a [CaseKey]) -> Self
pub fn with_subjects(self, value: &'a [CaseKey]) -> Self
Sets the subjects.
Sourcepub fn with_touched(self, value: &'a [CaseKey]) -> Self
pub fn with_touched(self, value: &'a [CaseKey]) -> Self
Sets the cases an act reached.
Sourcepub fn with_beside(self, value: &'a [CaseKey]) -> Self
pub fn with_beside(self, value: &'a [CaseKey]) -> Self
Sets the cases the ask may move on to.
Sourcepub fn with_reachable_only(self, value: &'a [CaseKey]) -> Self
pub fn with_reachable_only(self, value: &'a [CaseKey]) -> Self
Sets the cases in view only because they are reachable.
Sourcepub fn with_recent(self, value: &'a [RecentMessage]) -> Self
pub fn with_recent(self, value: &'a [RecentMessage]) -> Self
Sets the earlier messages.
Sourcepub fn with_preceding_reply(self, value: Option<&'a str>) -> Self
pub fn with_preceding_reply(self, value: Option<&'a str>) -> Self
Sets the reply just before this turn.
Sourcepub fn with_artifacts_shown(self, value: &'a [BlockId]) -> Self
pub fn with_artifacts_shown(self, value: &'a [BlockId]) -> Self
Sets the artifact blocks already shown.
Sourcepub fn with_case_labels(self, value: &'a [CaseLabel]) -> Self
pub fn with_case_labels(self, value: &'a [CaseLabel]) -> Self
Sets the case labels.
Sourcepub fn with_next_steps(self, value: &'a [(CaseKey, Vec<LocalizedText>)]) -> Self
pub fn with_next_steps(self, value: &'a [(CaseKey, Vec<LocalizedText>)]) -> Self
Sets what each case lets the user do next.
Sourcepub fn with_named_workflows(self, value: &'a [WorkflowKey]) -> Self
pub fn with_named_workflows(self, value: &'a [WorkflowKey]) -> Self
Sets the workflows the turn named.
Sets the workflows that cannot start.
Sourcepub fn with_disputes(self, value: &'a [String]) -> Self
pub fn with_disputes(self, value: &'a [String]) -> Self
Sets what the user disputed.
Sourcepub fn with_started(self, value: &'a [WorkflowKey]) -> Self
pub fn with_started(self, value: &'a [WorkflowKey]) -> Self
Sets the workflows started without a write.
Sourcepub fn with_contested(self, value: &'a [String]) -> Self
pub fn with_contested(self, value: &'a [String]) -> Self
Sets the receipts the user contested.
Sourcepub fn with_notices(self, value: &'a [ServerNotice]) -> Self
pub fn with_notices(self, value: &'a [ServerNotice]) -> Self
Sets the notices.
Sourcepub fn with_refusals(self, value: &'a [NarratableFact]) -> Self
pub fn with_refusals(self, value: &'a [NarratableFact]) -> Self
Sets the facts of what was decided.
Sourcepub fn with_outcomes(self, value: OutcomeFlags) -> Self
pub fn with_outcomes(self, value: OutcomeFlags) -> Self
Sets the outcome flags.
Sourcepub fn with_effort(self, value: Option<&'a EffortProfile>) -> Self
pub fn with_effort(self, value: Option<&'a EffortProfile>) -> Self
Sets the effort the turn runs at.