pub struct PromptInput {
pub header: InputHeader,
pub content: ContentInput,
pub typed_turn_appends: Vec<ConversationAppend>,
pub injected_context: Vec<ContentInput>,
pub turn_metadata: Option<RuntimeTurnMetadata>,
}Expand description
User/operator prompt input.
Fields§
§header: InputHeader§content: ContentInputThe prompt content — the single typed owner of this input’s content
fact (plain text or multimodal blocks). The text projection is derived
at read time via ContentInput::text_content; it is never stored
separately.
typed_turn_appends: Vec<ConversationAppend>Runtime-authored typed transcript appends that travel with this turn.
These are not operator-authored prompt content. The runtime projects them into model-facing text only when building the provider request.
injected_context: Vec<ContentInput>Host-attached injected context delivered alongside (not inside) this
turn’s prompt. Each entry lowers into a separate
ConversationAppendRole::InjectedContext transcript append placed
immediately BEFORE the turn’s user append, in order — the typed slot
the content arrived in mints the transcript role. Additive on durable
input persistence (absent on older persisted inputs).
turn_metadata: Option<RuntimeTurnMetadata>Implementations§
Source§impl PromptInput
impl PromptInput
Sourcepub fn new(
text: impl Into<String>,
turn_metadata: Option<RuntimeTurnMetadata>,
) -> Self
pub fn new( text: impl Into<String>, turn_metadata: Option<RuntimeTurnMetadata>, ) -> Self
Create a new operator prompt with default header.
Sourcepub fn from_content_input(
input: ContentInput,
turn_metadata: Option<RuntimeTurnMetadata>,
) -> Self
pub fn from_content_input( input: ContentInput, turn_metadata: Option<RuntimeTurnMetadata>, ) -> Self
Create a prompt from ContentInput (text or multimodal blocks).
Sourcepub fn with_injected_context(self, injected_context: Vec<ContentInput>) -> Self
pub fn with_injected_context(self, injected_context: Vec<ContentInput>) -> Self
Attach host-attached injected context to this prompt input.
Trait Implementations§
Source§impl Clone for PromptInput
impl Clone for PromptInput
Source§fn clone(&self) -> PromptInput
fn clone(&self) -> PromptInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more