pub struct PromptMessage {
pub role: Role,
pub content: Content,
}Expand description
One message of a prompts/get result.
Fields§
§role: RoleWho the message is meant for.
content: ContentWhat it says.
A Content rather than a String, because the schema types this field
as ContentBlock — the same union a tool result carries — and the
suite’s image-bearing prompt scenario depends on that. A prompt cannot
embed an image if its message is a string.
Implementations§
Trait Implementations§
Source§impl Clone for PromptMessage
impl Clone for PromptMessage
Source§impl Debug for PromptMessage
impl Debug for PromptMessage
Source§impl PartialEq for PromptMessage
impl PartialEq for PromptMessage
impl StructuralPartialEq for PromptMessage
Auto Trait Implementations§
impl Freeze for PromptMessage
impl RefUnwindSafe for PromptMessage
impl Send for PromptMessage
impl Sync for PromptMessage
impl Unpin for PromptMessage
impl UnsafeUnpin for PromptMessage
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