-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[FrontEnd] Display API cost and token usage in frontend #7099
Conversation
This PR needs to wait for backend PR #7082 merge first. And I may still change some details of the PR. But the inital design is finished. Let's make sure it can meet your requirement first! Tagging reviewers for best design discussion: @neubig, @rbren, @enyst, @amanape. All the screenshots Now I use tilin/testFrontendE2E branch to test and get the screenshots. Feel free to try it if you need it. |
@AutoLTX thanks for taking this on! I'd like to get some fuller designs done, but for now let's put the button inside the conversation card's context menu, and then show the costs in a modal Does that work for you? ![]() |
@rbren Certainly! I will follow your advice. And I guarantee to complete it before this weekend |
Awesome! Let's just show everything inside the pop-up modal |
79432e6
to
a8b33de
Compare
Hi, @amanape.I've update the code to align with @rbren 's requirement. Now all the CI passed. Could you please review it? |
Thanks for remind. @rbren I checked the code and use baseModal now. The window will be closed when users use "esc" or click other space of the website. I don't add additional close button. |
Gently ping, @amanape Could you please review this PR? |
Will do soon, hopefully later today. |
@AutoLTX How difficult would it be to include this information in the PR comments pushed ? |
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.
LGTM! Made a few small changes, but awesome work overall. Thanks!
End-user friendly description of the problem this fixes or functionality that this introduces.
Give a summary of what the PR does, explaining any non-trivial design decisions.
This will expose API cost and usage info to customers in on-demand mode.
Some screenshots:
Expose mode in default:
Link of any specific issues this addresses.
#5257