Interface ModelConfiguration.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<ModelConfiguration.Builder,,ModelConfiguration> SdkBuilder<ModelConfiguration.Builder,,ModelConfiguration> SdkPojo
- Enclosing class:
ModelConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionadditionalModelRequestFields(Map<String, Document> additionalModelRequestFields) Additional model request fields.default ModelConfiguration.BuilderinferenceConfig(Consumer<InferenceConfiguration.Builder> inferenceConfig) The inference configuration for the model, including parameters such as maximum tokens, temperature, and top-p.inferenceConfig(InferenceConfiguration inferenceConfig) The inference configuration for the model, including parameters such as maximum tokens, temperature, and top-p.The model to use for optimization.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
modelId
The model to use for optimization. The value depends on the resource that you use:
-
If you use a base model, specify the model ID or its ARN. For a list of model IDs, see Models at a glance in the Amazon Bedrock User Guide.
-
If you use a cross-Region (system-defined) inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see Supported Regions and models for inference profiles in the Amazon Bedrock User Guide.
-
If you use an application inference profile, specify its full ARN, including the account ID and Region.
- Parameters:
modelId- The model to use for optimization. The value depends on the resource that you use:-
If you use a base model, specify the model ID or its ARN. For a list of model IDs, see Models at a glance in the Amazon Bedrock User Guide.
-
If you use a cross-Region (system-defined) inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see Supported Regions and models for inference profiles in the Amazon Bedrock User Guide.
-
If you use an application inference profile, specify its full ARN, including the account ID and Region.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
inferenceConfig
The inference configuration for the model, including parameters such as maximum tokens, temperature, and top-p.
- Parameters:
inferenceConfig- The inference configuration for the model, including parameters such as maximum tokens, temperature, and top-p.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
inferenceConfig
default ModelConfiguration.Builder inferenceConfig(Consumer<InferenceConfiguration.Builder> inferenceConfig) The inference configuration for the model, including parameters such as maximum tokens, temperature, and top-p.
This is a convenience method that creates an instance of theInferenceConfiguration.Builderavoiding the need to create one manually viaInferenceConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toinferenceConfig(InferenceConfiguration).- Parameters:
inferenceConfig- a consumer that will call methods onInferenceConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
additionalModelRequestFields
ModelConfiguration.Builder additionalModelRequestFields(Map<String, Document> additionalModelRequestFields) Additional model request fields. Use this to pass model-specific parameters that are not included in the standard inference configuration.
- Parameters:
additionalModelRequestFields- Additional model request fields. Use this to pass model-specific parameters that are not included in the standard inference configuration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-