r/Python • u/AutoModerator • Nov 04 '26
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
36
Upvotes
r/Python • u/AutoModerator • Nov 04 '26
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
View all comments
1
u/behrouzbk 27d ago
tiktoken gives you the count for one string. This splits a whole request into its parts, prices each one on 20 models, and for prompts suggests concrete fixes with the saving for each. Under the hood it does use tiktoken's encodings, bundled so it works offline.
https://github.com/behrouzbk/tokensaver