Interface BedrockRuntimeClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.
Describes the API operations for running inference using Bedrock models.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic BedrockRuntimeClientBuilder
builder()
Create a builder that can be used to configure and create aBedrockRuntimeClient
.static BedrockRuntimeClient
create()
Create aBedrockRuntimeClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default InvokeModelResponse
invokeModel
(Consumer<InvokeModelRequest.Builder> invokeModelRequest) Invokes the specified Bedrock model to run inference using the input provided in the request body.default InvokeModelResponse
invokeModel
(InvokeModelRequest invokeModelRequest) Invokes the specified Bedrock model to run inference using the input provided in the request body.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadata
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
invokeModel
default InvokeModelResponse invokeModel(InvokeModelRequest invokeModelRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ModelTimeoutException, InternalServerException, ValidationException, ModelNotReadyException, ServiceQuotaExceededException, ModelErrorException, AwsServiceException, SdkClientException, BedrockRuntimeException 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).
- Parameters:
invokeModelRequest
-- Returns:
- Result of the InvokeModel operation returned by the service.
- See Also:
-
invokeModel
default InvokeModelResponse invokeModel(Consumer<InvokeModelRequest.Builder> invokeModelRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ModelTimeoutException, InternalServerException, ValidationException, ModelNotReadyException, ServiceQuotaExceededException, ModelErrorException, AwsServiceException, SdkClientException, BedrockRuntimeException 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 viaInvokeModelRequest.builder()
- Parameters:
invokeModelRequest
- AConsumer
that will call methods onInvokeModelRequest.Builder
to create a request.- Returns:
- Result of the InvokeModel operation returned by the service.
- See Also:
-
create
Create aBedrockRuntimeClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aBedrockRuntimeClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-