pub struct PromptInput {
pub header: InputHeader,
pub content: ContentInput,
pub typed_turn_appends: Vec<ConversationAppend>,
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.
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).
Trait Implementations§
Source§impl Clone for PromptInput
impl Clone for PromptInput
Source§fn clone(&self) -> PromptInput
fn clone(&self) -> PromptInput
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 moreSource§impl Debug for PromptInput
impl Debug for PromptInput
Source§impl<'de> Deserialize<'de> for PromptInput
impl<'de> Deserialize<'de> for PromptInput
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PromptInput
impl RefUnwindSafe for PromptInput
impl Send for PromptInput
impl Sync for PromptInput
impl Unpin for PromptInput
impl UnsafeUnpin for PromptInput
impl UnwindSafe for PromptInput
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
Mutably borrows from an owned value. Read more