pub struct PromptContents {
pub items: Vec<Item>,
pub metadata: MetadataMap,
}Expand description
The rendered output of a prompt template.
Returned by PromptProvider::get_prompt after applying the provided
arguments to the template. The resulting items are typically prepended to
the conversation transcript before the next model turn.
Fields§
§items: Vec<Item>The conversation items produced by rendering the prompt.
metadata: MetadataMapArbitrary key-value metadata about the rendering.
Implementations§
Source§impl PromptContents
impl PromptContents
Sourcepub fn with_metadata(self, metadata: MetadataMap) -> Self
pub fn with_metadata(self, metadata: MetadataMap) -> Self
Replaces the contents metadata.
Trait Implementations§
Source§impl Clone for PromptContents
impl Clone for PromptContents
Source§fn clone(&self) -> PromptContents
fn clone(&self) -> PromptContents
Returns a duplicate of the value. Read more
1.0.0 · 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 PromptContents
impl Debug for PromptContents
Source§impl<'de> Deserialize<'de> for PromptContents
impl<'de> Deserialize<'de> for PromptContents
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
Source§impl PartialEq for PromptContents
impl PartialEq for PromptContents
Source§impl Serialize for PromptContents
impl Serialize for PromptContents
impl StructuralPartialEq for PromptContents
Auto Trait Implementations§
impl Freeze for PromptContents
impl RefUnwindSafe for PromptContents
impl Send for PromptContents
impl Sync for PromptContents
impl Unpin for PromptContents
impl UnsafeUnpin for PromptContents
impl UnwindSafe for PromptContents
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