The LLM GPT-3.5 openai functionality requires an account to be set up with OpenAI.
First, create an OpenAI account or sign in. Next, navigate to the API key page and "Create new secret key", optionally naming the key. Make sure to save this somewhere safe and do not share it with anyone.
Then, you must create two system environment variables. If you want to do this as a one-off they can be created like this:
However, if you want R to always have access to these system environment variables you'll want to follow this guide.
Personally, I have a .Renviron file stored in my Documents folder that contains among other things, OPENAIKEY = <MY KEY>. This is loaded every time I open RStudio so I can always access those environment variables.
The LLM GPT-3.5 openai functionality requires an account to be set up with OpenAI.
First, create an OpenAI account or sign in. Next, navigate to the API key page and "Create new secret key", optionally naming the key. Make sure to save this somewhere safe and do not share it with anyone.
Then, you must create two system environment variables. If you want to do this as a one-off they can be created like this:
However, if you want R to always have access to these system environment variables you'll want to follow this guide.
Personally, I have a
.Renviron
file stored in my Documents folder that contains among other things,OPENAIKEY = <MY KEY>
. This is loaded every time I open RStudio so I can always access those environment variables.