Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implemented a function that retrieves the number of messages to translate, calculates the number of total tokens, and then calculates the total cost of the translation based on the current pricing from Open AI.
For each message, we craft the request to be sent to OpenAI and calculate the tokens for that request. In this early implementation, we assume the output tokens will be the same as the input tokens.
The prices are taken from the OpenAI documentation at the time of writing this PR. TODO keywords are added to do a better implementation on the next iteration.
Fixes #11
Type of change
How Has This Been Tested?
Checklist: