2 ms·
Thanks, it is good :) You don’t need the serverside though; you can just call openai apis straight from the client. Makes things easier!
by anonzzzies 4y ago
Thanks, it is good :) You don’t need the serverside though; you can just call openai apis straight from the client. Makes things easier!
- capableweb 4y agoIt seems to support both? First it tries to load the key from a environment variable, and if it cannot, it'll ask for it client-side. None the less, if you're building a project for others, you most likely don't want the secret key to be public, which it'd be if you embed it in the client-side code.
- anonzzzies 4y ago> It seems to support both? Ah, only saw the api one!
- yodon 4y agoIf you call the openai API's straight from the FrontEnd, you are likely leaking your api keys to visitors who can then use your api keys (and api key limits) for their own purposes.
- anonzzzies 4y agoNah, you ask them to enter their own; if you use yours, then yes, only use backend. In this case, the author is not using his, you have to bring your own, so frontend is fine.