prehistoric-carpenter-68779
03/26/2025, 5:30 AMtall-airline-16756
03/26/2025, 5:30 AMtall-airline-16756
03/26/2025, 5:31 AMpromptTokens
.
• Output Tokens: Includes both audio and text tokens, tracked as audioTokens
and textTokens
respectively.
• Total Tokens: The sum of all tokens used, tracked as totalTokens
.
Additionally, the ModelUsage
interface provides a detailed breakdown of input and output tokens, including:
• `input_tokens`: Total input tokens
• `input_token_details`: Breakdown of input tokens (audio, text, cached)
• `output_tokens`: Total output tokens
• `output_token_details`: Breakdown of output tokens (audio, text)
• `total_tokens`: Sum of all tokens used
Performance metrics like tokensPerSecond
and ttft
(time to first token) are also tracked for further analysis.
Sources: MultimodalLLMMetrics | LiveKit Agents | MultimodalLLMMetrics | LiveKit Agents | ModelUsage | LiveKit Agentsprehistoric-carpenter-68779
03/26/2025, 5:31 AMtall-airline-16756
03/26/2025, 5:31 AMMultimodalLLMMetrics
and ModelUsage
interfaces to track and calculate token usage programmatically. If you have access to the implementation, you can retrieve values like promptTokens
, audioTokens
, textTokens
, and totalTokens
from these interfaces.
If you need further assistance or a detailed example, please let me know, and I can escalate this to a human specialist for more support.