Skip to content

CompletionUsage

autogen.oai.oai_models.completion_usage.CompletionUsage #

Bases: BaseModel

model_config class-attribute #

model_config = ConfigDict(extra='allow')

completion_tokens instance-attribute #

completion_tokens

Number of tokens in the generated completion.

prompt_tokens instance-attribute #

prompt_tokens

Number of tokens in the prompt.

total_tokens instance-attribute #

total_tokens

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

completion_tokens_details class-attribute instance-attribute #

completion_tokens_details = None

Breakdown of tokens used in a completion.

prompt_tokens_details class-attribute instance-attribute #

prompt_tokens_details = None

Breakdown of tokens used in the prompt.