Skip to content
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

Merged
merged 6 commits into from
Oct 18, 2024

Conversation

Ashad-h
Copy link
Contributor

@Ashad-h Ashad-h commented Oct 18, 2024

  • Fix a bug where tokens count is not correct
  • Display detailed usage with prompt and completions tokens

Copy link

github-actions bot commented Oct 18, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

<Text.H6M color='foregroundMuted'>
Prompt tokens: {usage?.promptTokens} | Completion tokens:{' '}
{usage?.completionTokens}
</Text.H6M>
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image image

Copy link
Contributor

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?

Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes good idea ! What about something like this:

Untitled

Copy link
Contributor

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'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely!

@Ashad-h
Copy link
Contributor Author

Ashad-h commented Oct 18, 2024

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Oct 18, 2024
@geclos geclos merged commit 1ea6e74 into latitude-dev:main Oct 18, 2024
3 checks passed
@geclos
Copy link
Collaborator

geclos commented Oct 18, 2024

thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants