BedrockRuntimeClient

Describes the API operations for running inference using Amazon Bedrock models.

Properties

Link copied to clipboard
abstract override val config: BedrockRuntimeClient.Config

BedrockRuntimeClient's configuration

Functions

Link copied to clipboard

The action to apply a guardrail.

Link copied to clipboard
abstract suspend fun converse(input: ConverseRequest): ConverseResponse

Sends messages to the specified Amazon Bedrock model. Converse provides a consistent interface that works with all models that support messages. This allows you to write code once and use it with different models. If a model has unique inference parameters, you can also pass those unique parameters to the model.

Link copied to clipboard
abstract suspend fun <T> converseStream(input: ConverseStreamRequest, block: suspend (ConverseStreamResponse) -> T): T

Sends messages to the specified Amazon Bedrock model and returns the response in a stream. ConverseStream provides a consistent API that works with all Amazon Bedrock models that support messages. This allows you to write code once and use it with different models. Should a model have unique inference parameters, you can also pass those unique parameters to the model.

Link copied to clipboard

Retrieve information about an asynchronous invocation.

Link copied to clipboard
abstract suspend fun invokeModel(input: InvokeModelRequest): InvokeModelResponse

Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. You use model inference to generate text, images, and embeddings.

Link copied to clipboard

Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream. The response is returned in a stream that remains open for 8 minutes. A single session can contain multiple prompts and responses from the model. The prompts to the model are provided as audio files and the model's responses are spoken back to the user and transcribed.

Link copied to clipboard

Invoke the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. The response is returned in a stream.

Link copied to clipboard
abstract suspend fun listAsyncInvokes(input: ListAsyncInvokesRequest = ListAsyncInvokesRequest { }): ListAsyncInvokesResponse

Lists asynchronous invocations.

Link copied to clipboard

Starts an asynchronous invocation.

Inherited functions

Link copied to clipboard

The action to apply a guardrail.

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
inline suspend fun BedrockRuntimeClient.converse(crossinline block: ConverseRequest.Builder.() -> Unit): ConverseResponse

Sends messages to the specified Amazon Bedrock model. Converse provides a consistent interface that works with all models that support messages. This allows you to write code once and use it with different models. If a model has unique inference parameters, you can also pass those unique parameters to the model.

Link copied to clipboard

Retrieve information about an asynchronous invocation.

Link copied to clipboard

Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. You use model inference to generate text, images, and embeddings.

Link copied to clipboard

Lists asynchronous invocations.

Link copied to clipboard

Starts an asynchronous invocation.

Link copied to clipboard

Create a copy of the client with one or more configuration values overridden. This method allows the caller to perform scoped config overrides for one or more client operations.