neokd / NeoGPT

Chat effortlessly, execute commands, and interpret code with Llama3, Phi3, and more - your local AI assistant. Enjoy seamless interaction while ensuring ultimate privacy
https://neogpt.dev
MIT License
68 stars 62 forks source link

Add method to calculate TogetherAI cost based on number of tokens generated #186

Closed ayushmorbar closed 4 months ago

ayushmorbar commented 4 months ago

This pull request adds a new method to calculate the cost of TogetherAI queries based on the number of tokens generated. The method takes into account whether the query is a completion or not, and uses the appropriate cost per 1M tokens. This will provide more accurate cost estimation for TogetherAI queries.

refer #185

neokd commented 4 months ago

For together ai we don't need -completions since it calculates pricing for generated tokens only and not input tokens

ayushmorbar commented 4 months ago

For together ai we don't need -completions since it calculates pricing for generated tokens only and not input tokens

Understood.