Interface SampleOperationResult.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<SampleOperationResult.Builder,,SampleOperationResult> SdkBuilder<SampleOperationResult.Builder,,SampleOperationResult> SdkPojo
- Enclosing class:
SampleOperationResult
@Mutable
@NotThreadSafe
public static interface SampleOperationResult.Builder
extends SdkPojo, CopyableBuilder<SampleOperationResult.Builder,SampleOperationResult>
-
Method Summary
Modifier and TypeMethodDescriptiondefault SampleOperationResult.BuildercomputeLogprobs(Consumer<ComputeLogprobsResult.Builder> computeLogprobs) The computed log-probabilities for the prompt tokens.computeLogprobs(ComputeLogprobsResult computeLogprobs) The computed log-probabilities for the prompt tokens.default SampleOperationResult.BuilderloadWeightsForSampling(Consumer<LoadWeightsForSamplingResult.Builder> loadWeightsForSampling) The result from loading weights for sampling.loadWeightsForSampling(LoadWeightsForSamplingResult loadWeightsForSampling) The result from loading weights for sampling.default SampleOperationResult.Buildersample(Consumer<SampleResponse.Builder> sample) The generated text samples from the model.sample(SampleResponse sample) The generated text samples from the model.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
-
sample
The generated text samples from the model.
- Parameters:
sample- The generated text samples from the model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
sample
The generated text samples from the model.
This is a convenience method that creates an instance of theSampleResponse.Builderavoiding the need to create one manually viaSampleResponse.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosample(SampleResponse).- Parameters:
sample- a consumer that will call methods onSampleResponse.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
computeLogprobs
The computed log-probabilities for the prompt tokens.
- Parameters:
computeLogprobs- The computed log-probabilities for the prompt tokens.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
computeLogprobs
default SampleOperationResult.Builder computeLogprobs(Consumer<ComputeLogprobsResult.Builder> computeLogprobs) The computed log-probabilities for the prompt tokens.
This is a convenience method that creates an instance of theComputeLogprobsResult.Builderavoiding the need to create one manually viaComputeLogprobsResult.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocomputeLogprobs(ComputeLogprobsResult).- Parameters:
computeLogprobs- a consumer that will call methods onComputeLogprobsResult.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
loadWeightsForSampling
SampleOperationResult.Builder loadWeightsForSampling(LoadWeightsForSamplingResult loadWeightsForSampling) The result from loading weights for sampling.
- Parameters:
loadWeightsForSampling- The result from loading weights for sampling.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
loadWeightsForSampling
default SampleOperationResult.Builder loadWeightsForSampling(Consumer<LoadWeightsForSamplingResult.Builder> loadWeightsForSampling) The result from loading weights for sampling.
This is a convenience method that creates an instance of theLoadWeightsForSamplingResult.Builderavoiding the need to create one manually viaLoadWeightsForSamplingResult.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toloadWeightsForSampling(LoadWeightsForSamplingResult).- Parameters:
loadWeightsForSampling- a consumer that will call methods onLoadWeightsForSamplingResult.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-