pub struct AiMessage {
pub content: String,
pub tool_calls: Vec<ToolCall>,
pub parts: Vec<ContentPart>,
}Expand description
An AI/assistant message, optionally carrying tool call requests.
Fields§
§content: StringThe message text.
tool_calls: Vec<ToolCall>Tool calls requested by the model (omitted from JSON when empty).
parts: Vec<ContentPart>Multimodal parts. Empty for plain text.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AiMessage
impl<'de> Deserialize<'de> for AiMessage
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
impl StructuralPartialEq for AiMessage
Auto Trait Implementations§
impl Freeze for AiMessage
impl RefUnwindSafe for AiMessage
impl Send for AiMessage
impl Sync for AiMessage
impl Unpin for AiMessage
impl UnsafeUnpin for AiMessage
impl UnwindSafe for AiMessage
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