Added the "stats" option that calculate/estimate the total number of tokens and cost you generated per session. By default, this option is disabled unless you enable it as an argument.
⚠️ Warning
The returned token and cost values are estimated. It's not perfect. I tried to make it over estimate in the worse case. To see the exact cost of your usage, refer to OpenAI's usage portal.
Demo
> cha --stats -tp "false" -m "gpt-4"
User: Hello
Hi! How can I assist you today?
User: ^C
SESSION'S STATS (TEXT-BASED):
- LLM Model Name: gpt-4
~ Total Input+Output Tokens: 17 + 10 = 27
~ Total Input+Output Cost: $0.00 + $0.00 = $0.00111
About
Added the "stats" option that calculate/estimate the total number of tokens and cost you generated per session. By default, this option is disabled unless you enable it as an argument.
⚠️ Warning
The returned token and cost values are estimated. It's not perfect. I tried to make it over estimate in the worse case. To see the exact cost of your usage, refer to OpenAI's usage portal.
Demo