@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public interface AmazonBedrockRuntimeAsync extends AmazonBedrockRuntime
AsyncHandler
can be used to receive
notification when an asynchronous operation completes.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAmazonBedrockRuntimeAsync
instead.
Describes the API operations for running inference using Amazon Bedrock models.
ENDPOINT_PREFIX
Modifier and Type | Method and Description |
---|---|
Future<ApplyGuardrailResult> |
applyGuardrailAsync(ApplyGuardrailRequest applyGuardrailRequest)
The action to apply a guardrail.
|
Future<ApplyGuardrailResult> |
applyGuardrailAsync(ApplyGuardrailRequest applyGuardrailRequest,
AsyncHandler<ApplyGuardrailRequest,ApplyGuardrailResult> asyncHandler)
The action to apply a guardrail.
|
Future<ConverseResult> |
converseAsync(ConverseRequest converseRequest)
Sends messages to the specified Amazon Bedrock model.
|
Future<ConverseResult> |
converseAsync(ConverseRequest converseRequest,
AsyncHandler<ConverseRequest,ConverseResult> asyncHandler)
Sends messages to the specified Amazon Bedrock model.
|
Future<InvokeModelResult> |
invokeModelAsync(InvokeModelRequest invokeModelRequest)
Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in
the request body.
|
Future<InvokeModelResult> |
invokeModelAsync(InvokeModelRequest invokeModelRequest,
AsyncHandler<InvokeModelRequest,InvokeModelResult> asyncHandler)
Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in
the request body.
|
applyGuardrail, converse, getCachedResponseMetadata, invokeModel, shutdown
Future<ApplyGuardrailResult> applyGuardrailAsync(ApplyGuardrailRequest applyGuardrailRequest)
The action to apply a guardrail.
applyGuardrailRequest
- Future<ApplyGuardrailResult> applyGuardrailAsync(ApplyGuardrailRequest applyGuardrailRequest, AsyncHandler<ApplyGuardrailRequest,ApplyGuardrailResult> asyncHandler)
The action to apply a guardrail.
applyGuardrailRequest
- asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.Future<ConverseResult> converseAsync(ConverseRequest converseRequest)
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.
Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.
For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide
For example code, see Converse API examples in the Amazon Bedrock User Guide.
This operation requires permission for the bedrock:InvokeModel
action.
converseRequest
- Future<ConverseResult> converseAsync(ConverseRequest converseRequest, AsyncHandler<ConverseRequest,ConverseResult> asyncHandler)
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.
Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.
For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide
For example code, see Converse API examples in the Amazon Bedrock User Guide.
This operation requires permission for the bedrock:InvokeModel
action.
converseRequest
- asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.Future<InvokeModelResult> invokeModelAsync(InvokeModelRequest invokeModelRequest)
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.
For example code, see Invoke model code examples in the Amazon Bedrock User Guide.
This operation requires permission for the bedrock:InvokeModel
action.
invokeModelRequest
- Future<InvokeModelResult> invokeModelAsync(InvokeModelRequest invokeModelRequest, AsyncHandler<InvokeModelRequest,InvokeModelResult> asyncHandler)
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.
For example code, see Invoke model code examples in the Amazon Bedrock User Guide.
This operation requires permission for the bedrock:InvokeModel
action.
invokeModelRequest
- asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.