Package com.google.genkit.ai.agent
Class Artifact
java.lang.Object
com.google.genkit.ai.agent.Artifact
Artifact represents a named collection of content parts produced during agent execution.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Artifact.Builderbuilder()Creates a builder for Artifact.Returns the artifact metadata.getName()Returns the artifact name.getParts()Returns the artifact parts.voidsetMetadata(Map<String, Object> metadata) Sets the artifact metadata.voidSets the artifact name.voidSets the artifact parts.
-
Constructor Details
-
Artifact
public Artifact()Default constructor.
-
-
Method Details
-
builder
Creates a builder for Artifact.- Returns:
- a new builder
-
getName
Returns the artifact name.- Returns:
- the name
-
setName
Sets the artifact name.- Parameters:
name- the name
-
getParts
Returns the artifact parts.- Returns:
- the parts (never null)
-
setParts
Sets the artifact parts.- Parameters:
parts- the parts
-
getMetadata
Returns the artifact metadata.- Returns:
- the metadata, or null if not set
-
setMetadata
Sets the artifact metadata.- Parameters:
metadata- the metadata
-