Package com.google.genkit.ai.agent
Class AgentResult
java.lang.Object
com.google.genkit.ai.agent.AgentResult
AgentResult represents the final result of an agent execution.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AgentResult.Builderbuilder()Creates a builder for AgentResult.Returns the result artifacts.Returns the finish reason.Returns the result message.voidsetArtifacts(List<Artifact> artifacts) Sets the result artifacts.voidsetFinishReason(AgentFinishReason finishReason) Sets the finish reason.voidsetMessage(Message message) Sets the result message.
-
Constructor Details
-
AgentResult
public AgentResult()Default constructor.
-
-
Method Details
-
builder
Creates a builder for AgentResult.- Returns:
- a new builder
-
getMessage
Returns the result message.- Returns:
- the message
-
setMessage
Sets the result message.- Parameters:
message- the message
-
getArtifacts
Returns the result artifacts.- Returns:
- the artifacts
-
setArtifacts
Sets the result artifacts.- Parameters:
artifacts- the artifacts
-
getFinishReason
Returns the finish reason.- Returns:
- the finish reason
-
setFinishReason
Sets the finish reason.- Parameters:
finishReason- the finish reason
-