Interface SampleConfig.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<SampleConfig.Builder,,SampleConfig> SdkBuilder<SampleConfig.Builder,,SampleConfig> SdkPojo
- Enclosing class:
SampleConfig
-
Method Summary
Modifier and TypeMethodDescriptionincludePromptLogprobs(Boolean includePromptLogprobs) Specifies whether to include per-token log-probabilities for the input prompt in the response.modelPackageArn(String modelPackageArn) The ARN of the model package whose checkpoint this sample should run against.numSamples(Integer numSamples) The number of independent samples to generate for the prompt.default SampleConfig.Builderprompt(Consumer<ModelInput.Builder> prompt) The input prompt to send to the model for text generation.prompt(ModelInput prompt) The input prompt to send to the model for text generation.default SampleConfig.BuildersamplingParams(Consumer<SamplingParams.Builder> samplingParams) The parameters controlling the sampling strategy.samplingParams(SamplingParams samplingParams) The parameters controlling the sampling strategy.topkPromptLogprobs(Integer topkPromptLogprobs) The number of top-k log-probabilities to return per prompt token.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
-
prompt
The input prompt to send to the model for text generation.
- Parameters:
prompt- The input prompt to send to the model for text generation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
prompt
The input prompt to send to the model for text generation.
This is a convenience method that creates an instance of theModelInput.Builderavoiding the need to create one manually viaModelInput.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toprompt(ModelInput).- Parameters:
prompt- a consumer that will call methods onModelInput.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
numSamples
The number of independent samples to generate for the prompt.
- Parameters:
numSamples- The number of independent samples to generate for the prompt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
samplingParams
The parameters controlling the sampling strategy.
- Parameters:
samplingParams- The parameters controlling the sampling strategy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
samplingParams
The parameters controlling the sampling strategy.
This is a convenience method that creates an instance of theSamplingParams.Builderavoiding the need to create one manually viaSamplingParams.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosamplingParams(SamplingParams).- Parameters:
samplingParams- a consumer that will call methods onSamplingParams.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
includePromptLogprobs
Specifies whether to include per-token log-probabilities for the input prompt in the response.
- Parameters:
includePromptLogprobs- Specifies whether to include per-token log-probabilities for the input prompt in the response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
topkPromptLogprobs
The number of top-k log-probabilities to return per prompt token.
- Parameters:
topkPromptLogprobs- The number of top-k log-probabilities to return per prompt token.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
modelPackageArn
The ARN of the model package whose checkpoint this sample should run against. Must be a valid SageMaker model package ARN in the format
arn:aws:sagemaker:REGION:ACCOUNT:model-package/PACKAGE_NAME/VERSION. When absent, the sample runs against the session's latest checkpoint.- Parameters:
modelPackageArn- The ARN of the model package whose checkpoint this sample should run against. Must be a valid SageMaker model package ARN in the formatarn:aws:sagemaker:REGION:ACCOUNT:model-package/PACKAGE_NAME/VERSION. When absent, the sample runs against the session's latest checkpoint.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-