Forum Discussion
MichaelOSull894
2 years agoCommunity Member
Adding Chat GPT functionality to Storyline
Hi,
I am operating at the limit of my small knowledge about JavaScript here, but I hope someone can help.
I am trying to integrate a Q & A function to a course using Chat GPT. I have set up a te...
MichaelOSull894
2 years agoCommunity Member
Thanks for the quick response - the AI mentioned this when I asked it to check the code
"You are logging the error in the catch block, which is good for debugging, but you might want to handle errors more gracefully, e.g., show a message to the user in the event of an API failure". I assumed it meant that any error would show some sort of message - which I don't get.
I published the SL page to the web, and when I opened the Console I saw this as a URL - I know the key is there and only set up today. Does this make any sense to you?
{ "error": { "message": "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.", "type": "invalid_request_error", "param": null, "code": null } }