As a developer building ChatGPT plugins, am I responsible for the language model API credits, or does ChatGPT utilize the credits of the end users who install and use my plugin?
End usersâ tokens are used. As described in the plug-ins docs:
We then pass it in the Authorization header when making requests to the plugin (âAuthorizationâ: â[Bearer/Basic][userâs token]â)
As you can see, the userâs token (an encrypted version of the userâs API key) is used.
Hmm. I find the doc you link to confusing. Does this describe a protocol for authenticating the user wrt third parties the plugin wants to reference (e.g., corporate databases, etc), or can the oauth token sent to the plugin also be used in place of the developer openAI api-key for plugin requests to the openAI api itself?
Sorry if this seems dumb, Iâm an AI guy, minimally networking / security saavy.
Donât know for sure, but ChatGPT doesnât have API credits. Your plugin will receive a userâs query text and respond with text. You arenât interacting with the language model at all unless you are making additional OpenAI API calls (which would be against your API account, and up to you to develop a user authentication/monetization strategy)
Yup, thatâs how my plugin (llmsearch on github) currently works. It would be nice, though, if the OAuth mechanism provided a plugin with an âin-sessionâ version of the user OpenAI key that the plugin could use to charge api calls to the user account. My plugin makes multiple calls to gpt-3.5-turbo internally.
Seems like the openAI doc mentioned earlier might provide such a token, but Iâm not knowledgeable enough about OAuth to interpret it.
Can anyone clarify?
ChatGPT users donât have an OpenAI token though. They might not even have any payment method on file.
The docs Authentication is discussing how to authenticate the user against your backend system, so a plugin user could use your plugin to access their specific user data, or you can track requests to a specific user and charge them through your own methods. Youâll receive a token that you can match up on your backend to your user accounts. Itâs not authentication for OpenAI API.
thanks. Thatâs how I interpreted it, but was hoping maybe I was wrong.