pub enum MessageTemplate {
System(PromptTemplate),
Human(PromptTemplate),
AI(PromptTemplate),
Placeholder(String),
}Expand description
A template component that produces one or more Messages.
Variants§
System(PromptTemplate)
Renders a system message from a template string.
Human(PromptTemplate)
Renders a human message from a template string.
AI(PromptTemplate)
Renders an AI message from a template string.
Placeholder(String)
Injects messages from the input map under the given key. The value at that key must be a JSON array of Message objects.
Auto Trait Implementations§
impl Freeze for MessageTemplate
impl RefUnwindSafe for MessageTemplate
impl Send for MessageTemplate
impl Sync for MessageTemplate
impl Unpin for MessageTemplate
impl UnsafeUnpin for MessageTemplate
impl UnwindSafe for MessageTemplate
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