createMessage

abstract suspend fun createMessage(request: CreateMessageRequest, options: RequestOptions? = null): CreateMessageResult(source)

Creates a message using the server's sampling capability.

Return

The created message result.

Parameters

request

The parameters for creating a message.

options

Optional request options.

Throws

If the server does not support sampling or if the request fails.