@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface BedrockRuntimeAsyncClient extends AwsClient
builder() method.
Describes the API operations for running inference using Bedrock models.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static BedrockRuntimeAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
BedrockRuntimeAsyncClient. |
static BedrockRuntimeAsyncClient |
create()
Create a
BedrockRuntimeAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CompletableFuture<InvokeModelResponse> |
invokeModel(Consumer<InvokeModelRequest.Builder> invokeModelRequest)
Invokes the specified Bedrock model to run inference using the input provided in the request body.
|
default CompletableFuture<InvokeModelResponse> |
invokeModel(InvokeModelRequest invokeModelRequest)
Invokes the specified Bedrock model to run inference using the input provided in the request body.
|
default CompletableFuture<Void> |
invokeModelWithResponseStream(Consumer<InvokeModelWithResponseStreamRequest.Builder> invokeModelWithResponseStreamRequest,
InvokeModelWithResponseStreamResponseHandler asyncResponseHandler)
Invoke the specified Bedrock model to run inference using the input provided.
|
default CompletableFuture<Void> |
invokeModelWithResponseStream(InvokeModelWithResponseStreamRequest invokeModelWithResponseStreamRequest,
InvokeModelWithResponseStreamResponseHandler asyncResponseHandler)
Invoke the specified Bedrock model to run inference using the input provided.
|
default BedrockRuntimeServiceClientConfiguration |
serviceClientConfiguration() |
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.default CompletableFuture<InvokeModelResponse> invokeModel(InvokeModelRequest invokeModelRequest)
Invokes the specified Bedrock model to run inference using the input provided in the request body. You use InvokeModel to run inference for text models, image models, and embedding models.
For more information, see Run inference in the Bedrock User Guide.
For example requests, see Examples (after the Errors section).
invokeModelRequest - default CompletableFuture<InvokeModelResponse> invokeModel(Consumer<InvokeModelRequest.Builder> invokeModelRequest)
Invokes the specified Bedrock model to run inference using the input provided in the request body. You use InvokeModel to run inference for text models, image models, and embedding models.
For more information, see Run inference in the Bedrock User Guide.
For example requests, see Examples (after the Errors section).
This is a convenience which creates an instance of the InvokeModelRequest.Builder avoiding the need to
create one manually via InvokeModelRequest.builder()
invokeModelRequest - A Consumer that will call methods on
InvokeModelRequest.Builder to create a
request.default CompletableFuture<Void> invokeModelWithResponseStream(InvokeModelWithResponseStreamRequest invokeModelWithResponseStreamRequest, InvokeModelWithResponseStreamResponseHandler asyncResponseHandler)
Invoke the specified Bedrock model to run inference using the input provided. Return the response in a stream.
For more information, see Run inference in the Bedrock User Guide.
For an example request and response, see Examples (after the Errors section).
invokeModelWithResponseStreamRequest - default CompletableFuture<Void> invokeModelWithResponseStream(Consumer<InvokeModelWithResponseStreamRequest.Builder> invokeModelWithResponseStreamRequest, InvokeModelWithResponseStreamResponseHandler asyncResponseHandler)
Invoke the specified Bedrock model to run inference using the input provided. Return the response in a stream.
For more information, see Run inference in the Bedrock User Guide.
For an example request and response, see Examples (after the Errors section).
This is a convenience which creates an instance of the InvokeModelWithResponseStreamRequest.Builder
avoiding the need to create one manually via InvokeModelWithResponseStreamRequest.builder()
invokeModelWithResponseStreamRequest - A Consumer that will call methods on
InvokeModelWithResponseStreamRequest.Builder
to create a request.default BedrockRuntimeServiceClientConfiguration serviceClientConfiguration()
serviceClientConfiguration in interface AwsClientserviceClientConfiguration in interface SdkClientstatic BedrockRuntimeAsyncClient create()
BedrockRuntimeAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static BedrockRuntimeAsyncClientBuilder builder()
BedrockRuntimeAsyncClient.Copyright © 2023. All rights reserved.