ChatGPT Conversation Action

The API returns the number of tokens used by a request, and so it might be worth adding a message to each run (app.displayInfoMessage()) to help users understand how many tokens are being used, or (/and) even the financial cost for each API call. That would give users a better visualisation of what they are using up with each request.

Unfortunately, I can’t see any way in the API to query how many tokens a user has remaining. That would be even more useful to be able to show a user.

Unless I am missing something, that lack of being able to query the quota before making other calls seems to be a curious omission by OpenAI. I know limits can be set, but maybe not having that immediate visibility leads to greater use as people are not really keeping track of how much they are spending?