pub struct PromptMessage {
pub role: Role,
pub text: Template,
pub file: Option<Value>,
}Expand description
One prompt message template.
Fields§
§role: Role§text: Template§file: Option<Value>A prompt file the host did not read into text (it reads them when it
loads the workflow from a file, graphrt_core::prompt_files): the node
refuses to build instead of sending an empty message.
Trait Implementations§
Source§impl Clone for PromptMessage
impl Clone for PromptMessage
Source§impl Debug for PromptMessage
impl Debug for PromptMessage
Source§impl<'de> Deserialize<'de> for PromptMessage
impl<'de> Deserialize<'de> for PromptMessage
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 Forget for PromptMessage
impl Freeze for PromptMessagewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Part>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
impl Move for PromptMessage
impl RefUnwindSafe for PromptMessage
impl Send for PromptMessage
impl Sync for PromptMessage
impl Unpin for PromptMessage
impl UnsafeUnpin for PromptMessagewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Part>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
impl UnwindSafe for PromptMessage
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