Is there a way to SUM the total_tokens, completion_tokens, and prompt_tokens for a give userId over a date range, using the GraphQL API?
I am able to get users (and I believe date) using a filter - will I have to fetch all (with pagination) to get the sum? Similar to what is on the web version, but I think you all are hitting a REST api there?
Update: Been trying to do this via gql. All works well with my chat-completion requests (you get usage data as part of the responseBody). So I'm able to grab those for a period (I do a day) and sum them up easy enough - I've been keeping the total for the day count in my own db, so I only have to query the current day for updates.
I also do text-embedding requests, and those, unfortunately don't work and the responseBody returns with : "heliconeMessage": "Embeddings are too large to serve in bulk" and no usage data :(.
I might dig into it and create a contribution - but for now, I thought I'd post in case someone else was trying their luck at this...