Class GeneratedText.Builder
- java.lang.Object
-
- com.oracle.bmc.generativeaiinference.model.GeneratedText.Builder
-
- Enclosing class:
- GeneratedText
public static class GeneratedText.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeneratedText
build()
GeneratedText.Builder
copy(GeneratedText model)
GeneratedText.Builder
finishReason(String finishReason)
The reason why the model stopped generating tokens.GeneratedText.Builder
id(String id)
A unique identifier for this text generation.GeneratedText.Builder
likelihood(Double likelihood)
The overall likelihood of the generated text.GeneratedText.Builder
text(String text)
The generated text.GeneratedText.Builder
tokenLikelihoods(List<TokenLikelihood> tokenLikelihoods)
A collection of generated tokens and their corresponding likelihoods.
-
-
-
Method Detail
-
id
public GeneratedText.Builder id(String id)
A unique identifier for this text generation.- Parameters:
id
- the value to set- Returns:
- this builder
-
text
public GeneratedText.Builder text(String text)
The generated text.- Parameters:
text
- the value to set- Returns:
- this builder
-
likelihood
public GeneratedText.Builder likelihood(Double likelihood)
The overall likelihood of the generated text.When a large language model generates a new token for the output text, a likelihood is assigned to all tokens, where tokens with higher likelihoods are more likely to follow the current token. For example, it's more likely that the word favorite is followed by the word food or book rather than the word zebra. A lower likelihood means that it's less likely that token follows the current token.
- Parameters:
likelihood
- the value to set- Returns:
- this builder
-
finishReason
public GeneratedText.Builder finishReason(String finishReason)
The reason why the model stopped generating tokens.A model stops generating tokens if the model hits a natural stop point or reaches a provided stop sequence.
- Parameters:
finishReason
- the value to set- Returns:
- this builder
-
tokenLikelihoods
public GeneratedText.Builder tokenLikelihoods(List<TokenLikelihood> tokenLikelihoods)
A collection of generated tokens and their corresponding likelihoods.- Parameters:
tokenLikelihoods
- the value to set- Returns:
- this builder
-
build
public GeneratedText build()
-
copy
public GeneratedText.Builder copy(GeneratedText model)
-
-