generated from stratosphereips/awesome-code-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cost analysis functionality (#15)
* Add requirement for token counting * Fix formatting * Add prototype of cost calculation using tiktoken * Retrieves the messages, calculates total tokens and calculates the cost based on some current pricing from OpenAI * Ask to proceed based on the cost price of action
- Loading branch information
1 parent
ca5613c
commit 72cf26c
Showing
2 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
PyYAML | ||
openai>1.10 | ||
python-dotenv | ||
tiktoken |