-
Notifications
You must be signed in to change notification settings - Fork 108
Add chat session token usage #8619
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
Conversation
E2E Tests 🚀 |
be5d729
to
1d8585d
Compare
Updates chat history when setting changes
Fix echo model echoing the first message on subsequent responses
3f67dc8
to
2a1e1c3
Compare
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.
Nice, this is working great for me! I'm seeing a running total for tokens in the chat session, even when switching between providers. Toggling the setting on/off shows/hides the token counts as expected, without having to restart Positron 👍
Maybe one question for the future: how might we want to breakdown chat session token usage when the user toggles between different models and providers within the same session?
I think we'll have to see how common it is for a user to switch providers within a session. At least for now, the chat metadata does record the model and provider so we should be able to group it by those facets. |
Address #8472
Adds a container above the chat input for displaying total token usage. A preference listener was added so that the chat view can re-render the token usage for messages and session.
The echo model has also been fixed. It would only return the beginning of the message history. It returns the second last message (the last item is the context).
A couple of e2e tests have been added for basic checks.
Release Notes
New Features
Bug Fixes
QA Notes
I assume no other Assistant tests send multiple messages to the echo provider. But this should be possible now and it will echo the message that was sent.