CompletionTokensDetails¶
-
class
oci.generative_ai_inference.models.
CompletionTokensDetails
(**kwargs)¶ Bases:
object
Breakdown of tokens used in a completion.
Methods
__init__
(**kwargs)Initializes a new CompletionTokensDetails object with values from keyword arguments. Attributes
accepted_prediction_tokens
Gets the accepted_prediction_tokens of this CompletionTokensDetails. reasoning_tokens
Gets the reasoning_tokens of this CompletionTokensDetails. rejected_prediction_tokens
Gets the rejected_prediction_tokens of this CompletionTokensDetails. -
__init__
(**kwargs)¶ Initializes a new CompletionTokensDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - accepted_prediction_tokens (int) – The value to assign to the accepted_prediction_tokens property of this CompletionTokensDetails.
- reasoning_tokens (int) – The value to assign to the reasoning_tokens property of this CompletionTokensDetails.
- rejected_prediction_tokens (int) – The value to assign to the rejected_prediction_tokens property of this CompletionTokensDetails.
-
accepted_prediction_tokens
¶ Gets the accepted_prediction_tokens of this CompletionTokensDetails. When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
Returns: The accepted_prediction_tokens of this CompletionTokensDetails. Return type: int
-
reasoning_tokens
¶ Gets the reasoning_tokens of this CompletionTokensDetails. Tokens generated by the model for reasoning.
Returns: The reasoning_tokens of this CompletionTokensDetails. Return type: int
-
rejected_prediction_tokens
¶ Gets the rejected_prediction_tokens of this CompletionTokensDetails. When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits.
Returns: The rejected_prediction_tokens of this CompletionTokensDetails. Return type: int
-