pub struct PromptMessages { /* private fields */ }Expand description
Helper for building prompt messages
Implementations§
Source§impl PromptMessages
impl PromptMessages
pub fn new() -> PromptMessages
pub fn user(self, text: &str) -> PromptMessages
pub fn assistant(self, text: &str) -> PromptMessages
pub fn system(self, text: &str) -> PromptMessages
pub fn with_context(self, context: &str) -> PromptMessages
pub fn with_resource(self, role: PromptRole, uri: &str) -> PromptMessages
pub fn with_embedded_resource( self, role: PromptRole, resource: EmbeddedResourceReference, ) -> PromptMessages
pub fn build(self) -> Vec<PromptMessage>
Trait Implementations§
Source§impl Default for PromptMessages
impl Default for PromptMessages
Source§fn default() -> PromptMessages
fn default() -> PromptMessages
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PromptMessages
impl RefUnwindSafe for PromptMessages
impl Send for PromptMessages
impl Sync for PromptMessages
impl Unpin for PromptMessages
impl UnwindSafe for PromptMessages
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