pub struct Artifact {
pub name: Option<String>,
pub description: Option<String>,
pub parts: Vec<Part>,
pub metadata: BTreeMap<String, Value>,
}Expand description
A unit of output produced by a Task.
Wire form:
{
"name": "answer",
"description": "The agent's final answer.",
"parts": [Part, ...],
"metadata": {...}
}Fields§
§name: Option<String>An optional name. The spec does not require it; a part-only artifact (no name, no description) is valid.
description: Option<String>An optional human-readable description. Agents that want a UI surface to label the artifact set it; agents that treat the artifact as an opaque payload do not.
parts: Vec<Part>The artifact’s content. An empty list is a valid artifact (an empty result); the spec does not require at least one part.
metadata: BTreeMap<String, Value>Per-artifact metadata. Same shape and
rationale as Task::metadata.
Implementations§
Source§impl Artifact
impl Artifact
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Artifact
impl<'de> Deserialize<'de> for Artifact
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 Eq for Artifact
impl StructuralPartialEq for Artifact
Auto Trait Implementations§
impl Freeze for Artifact
impl RefUnwindSafe for Artifact
impl Send for Artifact
impl Sync for Artifact
impl Unpin for Artifact
impl UnsafeUnpin for Artifact
impl UnwindSafe for Artifact
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