#ChatGPT on my site
16 messages · Page 1 of 1 (latest)
You might need an api key, if you are using it client side the api key will be exposed. Which is dangerous.
i have a api key
This doesn't make sense to me
it looks like you're using the openai library script for javascript?
You need to write code that uses the API
Try using
https://cdn.jsdelivr.net/npm/openai@3.2.1/dist/index.min.js
If you are using it on the frontend/website that will be open to public. Please stop immediately 🛑. Calling OpenAI API requires an API Key. If you are using it on the front end, everyone will be able to steal it and you might end up with a very huge bill.
Either use it on the server side, or use it for local usage only.
dosent work
Like I said
You can't just put that script in
This is the library
You need to write code for your frontend that uses this library
Just putting https://cdn.jsdelivr.net/npm/openai@3.2.1/dist/index.min.js in <script> tags won't do anything