openai-python
openai-python copied to clipboard
Check usage of a given user
I am testing out an application, and am using the user
field to set which user has made a request. From the docs, it says that OpenAI uses this to check for abuse.
However, is there a way to get more data from the API on a per-user level? E.g. number of calls, etc.
Hi @Wheest! Thanks for the issue.
I don't think there's a way to do per-user level analysis at this time. cc @kennyhsu5
Many thanks.
I can of course see usage at https://beta.openai.com/account/usage, which lists details of each request, e.g.:
08:48
Local time: 19 May 2022, 09:48
text-davinci, 1 request
103 prompt + 40 completion = 143 tokens (<$0.01)
Having the user string added here would be valuable to understanding usage (and less overhead than trying to correlate using other data). I've not seen a way to export this usage data (e.g. to a CSV or JSON), but I could be missing that.
Thanks for the suggestion!
This sounds like a feature request for the underlying OpenAI API and not the Python library, so I'm going to go ahead and close this issue.
Would you mind reposting at community.openai.com?