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 StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic BedrockRuntimeClientBuilderbuilder()Create a builder that can be used to configure and create aBedrockRuntimeClient.static BedrockRuntimeClientcreate()Create aBedrockRuntimeClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default InvokeModelResponseinvokeModel(Consumer<InvokeModelRequest.Builder> invokeModelRequest) Invokes the specified Bedrock model to run inference using the input provided in the request body.default InvokeModelResponseinvokeModel(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 ServiceMetadataMethods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods 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.Builderavoiding the need to create one manually viaInvokeModelRequest.builder()- Parameters:
invokeModelRequest- AConsumerthat will call methods onInvokeModelRequest.Builderto create a request.- Returns:
- Result of the InvokeModel operation returned by the service.
- See Also:
-
create
Create aBedrockRuntimeClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aBedrockRuntimeClient. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-