OutputTokenDetails#

class langchain_core.messages.ai.OutputTokenDetails[source]#

Breakdown of output token counts.

Does not need to sum to full output token count. Does not need to have all keys.

Example

{
    "audio": 10,
    "reasoning": 200,
}

Added in version 0.3.9.

audio: int#

Audio output tokens.

reasoning: int#

Reasoning output tokens.

Tokens generated by the model in a chain of thought process (i.e. by OpenAI’s o1 models) that are not returned as part of model output.