Is there a way to get the total input / output tokens in the traces table? Given that input and output tokens are priced differently, it would be helpful to be able to quantify the price per query going through the system
Yes, you can obtain the total input and output tokens in the traces table. According to this GitHub pull request, Phoenix has added a feature to calculate the total token count for trace pages, which includes both input (prompt) and output (completion) tokens. This allows you to quantify the cost per query by summing these token counts.Would you like more detail on how to implement this or access these token counts?Sources:
- this GitHub pull request
💡Hint: Mention RunLLM in the thread for followups.
Hey Ben M. good point - you are right that this is available on the API as well as via a tooltip. Is it that you want an explicit column to view and sort by these or?
I can look at it at a per trace level, but I would love for the 2 to be broken out in the header. Right now, it just shows total tokens for the time period and I expected a similar tool tip