LogProbability¶
- class oci.generative_ai_inference.models.LogProbability(**kwargs)¶
Bases:
objectThe log probabilities of the generated tokens.
Methods:
__init__(**kwargs)Initializes a new LogProbability object with values from keyword arguments.
Attributes:
Gets the log_probabilities of this LogProbability.
Gets the text of this LogProbability.
Gets the token_ids of this LogProbability.
- __init__(**kwargs)¶
Initializes a new LogProbability object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
- Parameters
token_ids (list[int]) – The value to assign to the token_ids property of this LogProbability.
text (str) – The value to assign to the text property of this LogProbability.
log_probabilities (list[float]) – The value to assign to the log_probabilities property of this LogProbability.
- property log_probabilities¶
Gets the log_probabilities of this LogProbability. The log probability of each token used to construct the text chunk.
- Returns
The log_probabilities of this LogProbability.
- Return type
list[float]
- property text¶
Gets the text of this LogProbability. The text chunk for which the log probabilities was calculated.
- Returns
The text of this LogProbability.
- Return type
str
- property token_ids¶
Gets the token_ids of this LogProbability. The token ids of each token used to construct the text chunk.
- Returns
The token_ids of this LogProbability.
- Return type
list[int]