@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AbstractAmazonBedrockRuntimeAsync extends AbstractAmazonBedrockRuntime implements AmazonBedrockRuntimeAsync
AmazonBedrockRuntimeAsync
. Convenient method forms pass through to the
corresponding overload that takes a request object and an AsyncHandler
, which throws an
UnsupportedOperationException
.ENDPOINT_PREFIX
Modifier and Type | Method and Description |
---|---|
Future<ApplyGuardrailResult> |
applyGuardrailAsync(ApplyGuardrailRequest request)
The action to apply a guardrail.
|
Future<ApplyGuardrailResult> |
applyGuardrailAsync(ApplyGuardrailRequest request,
AsyncHandler<ApplyGuardrailRequest,ApplyGuardrailResult> asyncHandler)
The action to apply a guardrail.
|
Future<ConverseResult> |
converseAsync(ConverseRequest request)
Sends messages to the specified Amazon Bedrock model.
|
Future<ConverseResult> |
converseAsync(ConverseRequest request,
AsyncHandler<ConverseRequest,ConverseResult> asyncHandler)
Sends messages to the specified Amazon Bedrock model.
|
Future<InvokeModelResult> |
invokeModelAsync(InvokeModelRequest request)
Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in
the request body.
|
Future<InvokeModelResult> |
invokeModelAsync(InvokeModelRequest request,
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyGuardrail, converse, getCachedResponseMetadata, invokeModel, shutdown
public Future<ApplyGuardrailResult> applyGuardrailAsync(ApplyGuardrailRequest request)
AmazonBedrockRuntimeAsync
The action to apply a guardrail.
applyGuardrailAsync
in interface AmazonBedrockRuntimeAsync
public Future<ApplyGuardrailResult> applyGuardrailAsync(ApplyGuardrailRequest request, AsyncHandler<ApplyGuardrailRequest,ApplyGuardrailResult> asyncHandler)
AmazonBedrockRuntimeAsync
The action to apply a guardrail.
applyGuardrailAsync
in interface AmazonBedrockRuntimeAsync
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.public Future<ConverseResult> converseAsync(ConverseRequest request)
AmazonBedrockRuntimeAsync
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.
converseAsync
in interface AmazonBedrockRuntimeAsync
public Future<ConverseResult> converseAsync(ConverseRequest request, AsyncHandler<ConverseRequest,ConverseResult> asyncHandler)
AmazonBedrockRuntimeAsync
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.
converseAsync
in interface AmazonBedrockRuntimeAsync
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.public Future<InvokeModelResult> invokeModelAsync(InvokeModelRequest request)
AmazonBedrockRuntimeAsync
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.
invokeModelAsync
in interface AmazonBedrockRuntimeAsync
public Future<InvokeModelResult> invokeModelAsync(InvokeModelRequest request, AsyncHandler<InvokeModelRequest,InvokeModelResult> asyncHandler)
AmazonBedrockRuntimeAsync
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.
invokeModelAsync
in interface AmazonBedrockRuntimeAsync
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.