SendMessageRequestBuilder

Builder class for creating SendMessageRequest instances.

This builder provides a fluent API for creating SendMessageRequest objects, making it easier to configure message send requests according to the A2A protocol.

See also

A2A Protocol - Send a Message

Example usage:

val request = sendMessageRequest {
id = "request-123"
params {
message {
role = Message.Role.user
parts = listOf(
textPart(text = "Hello, how can I help you?")
)
}
streamResponse = true
}
}

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var id: String?
Link copied to clipboard

Functions

Link copied to clipboard

Builds a SendMessageRequest instance with the configured parameters.

Link copied to clipboard

Sets the ID of the request.

Link copied to clipboard

Configures the message send params using a Java-friendly Consumer.

Configures the message send params using a lambda with receiver.