-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
Description
Adding a new command-line flag --token-usage
/-t
to be able to quickly check the amount of tokens that have been sent with the prompt and received from the LLM in completion object.
This can help you manage the costs of the API requests, and improve the efficiency of interactions with a LLM.
Implementation
Implementing this feature would require:
- Adding the code for parsing the
--token-usage
/-t
option flag argument from the command line incodeMage.py
. - Modifying
translator.py
to check if the flag was provided and, if present, output the token usage information tostderr
. (Information about the token usage can be found inside the completion object).
Metadata
Metadata
Assignees
Labels
No labels