CompletionUsage

CompletionUsage(**data: Any)

!!! abstract “Usage Documentation” Models

A base class for creating Pydantic models.

Parameters:
NameDescription
**dataType: Any

Class Attributes

completion_tokens


Number of tokens in the generated completion.

completion_tokens_details


Breakdown of tokens used in a completion.

model_config



prompt_tokens


Number of tokens in the prompt.

prompt_tokens_details


Breakdown of tokens used in the prompt.

total_tokens


Total number of tokens used in the request (prompt + completion).