pub struct Task {
pub kind: String,
pub id: String,
pub context_id: String,
pub status: TaskStatus,
pub history: Vec<Message>,
pub artifacts: Vec<Artifact>,
pub metadata: Option<HashMap<String, Value>>,
}Expand description
Represents a single, stateful operation or conversation between a client and an agent.
Fields§
§kind: StringThe type of this object, used as a discriminator. Always ‘task’.
id: StringA unique identifier for the task, generated by the server for a new task.
context_id: StringA server-generated identifier for maintaining context across multiple related tasks or interactions.
status: TaskStatusThe current status of the task, including its state and a descriptive message.
history: Vec<Message>An array of messages exchanged during the task, representing the conversation history.
artifacts: Vec<Artifact>A collection of artifacts generated by the agent during the execution of the task.
metadata: Option<HashMap<String, Value>>Optional metadata for extensions. The key is an extension-specific identifier.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
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 Task
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
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