SendMessageResponseBuilder
Builder class for creating SendMessageResponse instances.
This builder provides a fluent API for creating SendMessageResponse objects, making it easier to configure message send responses according to the A2A protocol.
Example usage:
val response = sendMessageResponse {
id = "request-123"
result {
id = "task-456"
status {
state = TaskState.working
timestamp = System.currentTimeMillis()
}
artifacts = listOf(
Artifact {
name = "response"
parts = listOf(
TextPart(text = "I can help you with that!")
)
}
)
}
}Content copied to clipboard
See also
Properties
Functions
Link copied to clipboard
Builds a SendMessageResponse instance with the configured parameters.
Link copied to clipboard
Sets the error.
Link copied to clipboard
Sets the ID of the response.
Link copied to clipboard
Sets the result task.
Configures the result task using a Java-friendly Consumer.
Configures the result task using a lambda with receiver.