Interface SampledSequence.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<SampledSequence.Builder,,SampledSequence> SdkBuilder<SampledSequence.Builder,,SampledSequence> SdkPojo
- Enclosing class:
SampledSequence
-
Method Summary
Modifier and TypeMethodDescriptionThe per-token log-probabilities for the generated tokens.logprobs(Collection<Double> logprobs) The per-token log-probabilities for the generated tokens.stopReason(String stopReason) The reason why generation stopped.stopReason(StopReason stopReason) The reason why generation stopped.The token IDs of the generated sequence.tokens(Collection<Integer> tokens) The token IDs of the generated sequence.default SampledSequence.BuildertokenUsage(Consumer<SampleTokenUsage.Builder> tokenUsage) The token usage statistics for this individual sample.tokenUsage(SampleTokenUsage tokenUsage) The token usage statistics for this individual sample.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
-
stopReason
The reason why generation stopped. A value of
stopindicates a stop sequence was encountered. A value oflengthindicates the maximum token limit was reached.- Parameters:
stopReason- The reason why generation stopped. A value ofstopindicates a stop sequence was encountered. A value oflengthindicates the maximum token limit was reached.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
stopReason
The reason why generation stopped. A value of
stopindicates a stop sequence was encountered. A value oflengthindicates the maximum token limit was reached.- Parameters:
stopReason- The reason why generation stopped. A value ofstopindicates a stop sequence was encountered. A value oflengthindicates the maximum token limit was reached.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
tokens
The token IDs of the generated sequence.
- Parameters:
tokens- The token IDs of the generated sequence.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tokens
The token IDs of the generated sequence.
- Parameters:
tokens- The token IDs of the generated sequence.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
logprobs
The per-token log-probabilities for the generated tokens.
- Parameters:
logprobs- The per-token log-probabilities for the generated tokens.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
logprobs
The per-token log-probabilities for the generated tokens.
- Parameters:
logprobs- The per-token log-probabilities for the generated tokens.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tokenUsage
The token usage statistics for this individual sample.
- Parameters:
tokenUsage- The token usage statistics for this individual sample.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tokenUsage
The token usage statistics for this individual sample.
This is a convenience method that creates an instance of theSampleTokenUsage.Builderavoiding the need to create one manually viaSampleTokenUsage.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totokenUsage(SampleTokenUsage).- Parameters:
tokenUsage- a consumer that will call methods onSampleTokenUsage.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-