pub struct Message {
pub kind: String,
pub message_id: String,
pub role: MessageRole,
pub parts: Vec<Part>,
pub context_id: Option<String>,
pub task_id: Option<String>,
pub reference_task_ids: Vec<String>,
pub extensions: Vec<String>,
pub metadata: Option<HashMap<String, Value>>,
}Expand description
Represents a single message in the conversation between a user and an agent.
Fields§
§kind: StringThe type of this object, used as a discriminator. Always ‘message’.
message_id: StringA unique identifier for the message, typically a UUID, generated by the sender.
role: MessageRoleIdentifies the sender of the message. user for the client, agent for the service.
parts: Vec<Part>An array of content parts that form the message body.
context_id: Option<String>The context identifier for this message, used to group related interactions.
task_id: Option<String>The identifier of the task this message is part of. Can be omitted for the first message of a new task.
reference_task_ids: Vec<String>A list of other task IDs that this message references for additional context.
extensions: Vec<String>The URIs of extensions that are relevant to this message.
metadata: Option<HashMap<String, Value>>Optional metadata for extensions. The key is an extension-specific identifier.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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 Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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