
1·
4 months agoThose examples are perfectly secure if you set the allowed origins to only your domains, or domains you specifically want to allow use of your API.
If someone copied those examples verbatim, they’d end up allowing a website hosted at example.com to call their API. Which I suppose is technically not secure, but I wouldn’t call it very insecure unless example.com was taken over by a malicious user.
I think users of LLMs often suffer from a sort of Gell-Mann amnesia phenomenon. If you are well versed on a topic, you can often find the mistakes they make; but, when researching a topic you are unfamiliar with, the responses feel like the “AI” knows what it’s talking about.