ArtifactBuilder
Builder class for creating Artifact instances.
This builder provides a fluent API for creating Artifact objects, making it easier to construct complex artifacts with many parameters.
Example usage:
val artifact = Artifact.create {
name = "response"
description = "AI response artifact"
textPart("I can help you with that!")
index = 0
append = false
lastChunk = true
}Functions
Adds a part to the artifact.
Sets whether to append the artifact.
Creates a data part using the provided Java-friendly Consumer.
Creates a data part using the provided configuration block.
Sets the description of the artifact.
Creates a file part using the provided Java-friendly Consumer.
Creates a file part using the provided configuration block.
Sets the index of the artifact.
Sets whether this is the last chunk of the artifact.
Sets the metadata of the artifact.
Sets the name of the artifact.
Sets the parts of the artifact.
Creates a text part using the provided Java-friendly Consumer.
Creates a text part using the provided configuration block.