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

Print token costs after each message #249

Closed
materemias opened this issue Nov 6, 2024 · 9 comments
Closed

Print token costs after each message #249

materemias opened this issue Nov 6, 2024 · 9 comments
Labels
enhancement New feature or request

Comments

@materemias
Copy link

eg aider prints after each answer:

Tokens: 4.0k sent, 264 received.
Cost: $0.02 message, $0.05 session. 

something like this would be beneficial for gptme as well

@ErikBjare
Copy link
Owner

We have the /tokens command which prints the input costs for the session.

Will consider adding a feature to include the output cost too.

@ErikBjare ErikBjare added the enhancement New feature or request label Nov 6, 2024
@ErikBjare ErikBjare changed the title FR: please consider adding estimated cost to the output Print token costs after each message Nov 6, 2024
@Kamalesh-Seervi
Copy link

can I work on this

@ErikBjare
Copy link
Owner

@Kamalesh-Seervi Sure, give it a shot! :)

@Kamalesh-Seervi

This comment was marked as off-topic.

@Kamalesh-Seervi

This comment was marked as off-topic.

@ErikBjare
Copy link
Owner

tokenizer isn't supported in Python 3.13: #198

But it seems to have finally been merged 5 days ago: huggingface/tokenizers#1639 (comment)

Use Python 3.10-3.12

@Kamalesh-Seervi
Copy link

yeh fine I will downgrade and work around cool thanks for quick response

@ErikBjare
Copy link
Owner

I implemented something basic here: #293

@ErikBjare
Copy link
Owner

Fixed in #293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants