openai / tiktoken

tiktoken is a fast BPE tokeniser for use with OpenAI's models.
MIT License
11.61k stars 784 forks source link

Feature Request: return dollar amount for OpenAI request response #157

Closed dhruv-anand-aintech closed 1 year ago

dhruv-anand-aintech commented 1 year ago

the openai library returns the number of tokens with each response. However, the pricing keeps changing. Is there a way you can add the dollar amount to that response, or a function for the same in tiktoken?

hauntsaninja commented 1 year ago

Out of scope for this library, maybe make the feature request over at https://github.com/openai/openai-python