Need OpenAI key so JavaScript can be analyzed

Hi,

New Five user. I’m building an app which has some JavaScript code. In the code window, when I click the “Check for Errors” button it says “OPENAI-KEY missing from your configuration”.

I am using the free version to develop my first application. One of the blogs, " How To Use The AI Assistant And Code Editor" says I need an OpenAI API key, which I have. It also says I need 1. Access to Five on the cloud (with a paid subscription).

Is this actually true? Like most people starting out, I can’t really justify a paid subscription until I make sure this will work for me to create my application. The Five website said I could download a fully functional program to develop my application, then only need to subscribe to host it on the web.

It seems a shame that I can’t check my code for errors without that API key. This seems like a catch-22.

Is this a mistake on my part, or is there a way to use my OpenAI API key to validate my code without having a paid subscription?

Hi @RMittelman, thanks for your question! To add your OpenAI key to Five, a valid subscription is indeed required. We might not be as smart as OpenAI but if your code produces an error, please post it in our user community here and we will do our best to fix it for you!

In our free version, you can also use the Five Inspector to better understand your code. This is a pretty powerful tool, especially when used with Five’s log() function. To better understand how the Inspector works, please watch this video: https://www.youtube.com/watch?v=JL4g3bADaSM

Generally speaking, Five is compatible with standard JavaScript or TypeScript, so you can also check your code in ChatGPT before pasting it into Five.

Best

Dom

So now I have a paid subscription, and want to add an open-ai key. I have an openAI account. On their website, it shows how to add a key, but it’s called a secret key. They say absolutely do not apply that to a website or client-side in a browser.

So am I supposed to create a secret key and add that to five in order to analyze my code, or is there a different type of key besides secret key?

Hello,

Within this link is a walk through video displaying how the AI assistant works and how to also set up the AI assistant. You will be fine to copy and paste the API key generated by Open AI straight into Five.

Thanks,
Riley.

Thanks Riley. I found an open-ai key in my notes app, and added it to my configuration as the article describes. Then I logged out of five and back into my control account. When I open some code and click the explain button, it still says OPENAI-KEY missing from your configuration.
I tried deleting all history, cookies and cache for the website. Still no luck.

What did I do wrong?

I don’t know why this topic is not being answered, almost a month after my last message was sent.

Just in case there was something wrong with my openAI key, I went back to the OpenAI site and generated a new secret key. It was much longer than the one I had in my notes, so that one may have been bad.

I put the new key into my configuration and saved the record, then opened the application and tried to analyze function code. It still says that OPENAI-KEY missing from your configuration.

Just in case Five needs a service account key instead of one assigned to me, I went back and added that, then used the service account key in Five configuration. Still doesn’t work.

Can you please help with this?

Hi Ron,

The blog you are using is out of date. Please use this link to set up your OPENAI_KEY. You will notice you need to use an underscore, not a hyphen. I will see that this blog gets updated.

The error message that you are getting is misleading, this has already been fixed.

Setup OpenAI | Five | Low-Code For Real Developers

Kind regards,
Jo

Thanks for the help, Jo.

I used the link Vin sent me. But now it doesn’t give me the error. Still doesn’t work, but not your fault. Now it says something about exceeding my ChatGPT limit. I’ll figure that out with them. Thanks again.

Ron Mittelman