-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/add bot token usage #609
Conversation
RaoHai
commented
Dec 24, 2024
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis pull request introduces a new feature for analyzing bot token usage. It adds a new admin page to display token usage statistics, including input and output tokens, top bots, and top users. The implementation includes new hooks, services, and database functions to support these analytics. Changes
|
color="primary" | ||
formatOptions={{ style: "decimal"}} | ||
label={record.user_name} | ||
maxValue={maxBy(topBots, 'total_tokens')?.total_tokens} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that maxBy(topBots, 'total_tokens')?.total_tokens
is not undefined
before using it as maxValue
. Consider providing a default value to avoid potential runtime errors.
Codecov ReportAttention: Patch coverage is
|
11e6028
to
ac07ebc
Compare