-
Notifications
You must be signed in to change notification settings - Fork 62
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
Display detailed usage with prompt and completion tokens in playground #461
Conversation
Ashad-h
commented
Oct 18, 2024
- Fix a bug where tokens count is not correct
- Display detailed usage with prompt and completions tokens
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
<Text.H6M color='foregroundMuted'> | ||
Prompt tokens: {usage?.promptTokens} | Completion tokens:{' '} | ||
{usage?.completionTokens} | ||
</Text.H6M> |
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.
How looks this? Can you put a screenshot?
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.
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.
Hey @Ashad-h thank you so much for your contribution! I really like the detailed count but I'm afraid it might be too much info for the user.
What do you think about keeping the general count as it was and then showing this detailed count in a tooltip when hovering the original element?
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.
Tip: here's an example of using our Tooltip component
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.
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.
Yes, that's nice. The only thing put side='top'
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.
Done :)
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.
Lovely!
I have read the CLA Document and I hereby sign the CLA |
.../[commitUuid]/documents/[documentUuid]/_components/DocumentEditor/Editor/Playground/Chat.tsx
Outdated
Show resolved
Hide resolved
thanks! |