Thank you for sharing the log details! Let me walk you through what each attribute means to help you better understand the performance and usage metrics for real-time AI model interactions:
•
type: This tells us the kind of metric we're looking at, which is 'realtime_model_metrics' here.
•
label: Shows the source or type of the model, like 'livekit.plugins.google.beta.realtime' in this case.
•
request_id: A unique ID that helps us track this specific request.
•
timestamp: The exact time, in seconds, when the response was created.
•
duration: How long, in seconds, it took to complete the response.
•
ttft: Stands for "Time to First Token" — basically, how quickly the first token was received (0.4549 seconds here).
•
cancelled: Indicates whether the request was cancelled or not (here, it wasn’t).
•
input_tokens: The total number of input tokens involved (4043 here), covering audio, text, and image tokens.
•
output_tokens: Number of tokens generated in the output (45 here).
•
total_tokens: The sum of input and output tokens (4088 in this example).
•
tokens_per_second: How many output tokens are generated each second (4.39 here).
•
input_token_details: A detailed look at input tokens by type — audio: 1, text: 4042, image: 0.
•
output_token_details: Similarly, a breakdown of output tokens — text: 45, audio: 0, image: 0.
These metrics are really helpful for keeping an eye on and analyzing how the real-time model interactions are performing. If you have any questions or want to dive deeper into any part, I’m here to help!
Sources:
agents/src/metrics/usage_collector.ts |
livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realti...