Skip to main content

Set up OpenAI LLM Profile

info

When you sign up for OpenAI, you'll get $5 in free credits. This credit limit is more than sufficient to run examples listed here.

Sign up

First off, you'll need to sign up for the OpenAI Platform. Please note that this is different from signing up for ChatGPT. The idea here is to get an API key for the GPT API, which is the underlying technology for ChatGPT. Once you successfully do so, you should have $5 is free credits. Now, let's fetch an API key we can use with the Unstract Platform.

img OpenAI free credits

Create a New OpenAI API Key

Clicking on API Keys from the side menu, enter Unstract as the name for the new API key while keeping permissions unchanged to "All".

img Create new OpenAI API key

Click on Create secret key to create a new API key. An important thing to remember is that you need to copy the key immediately. If you dismiss that dialog box, there's no way to retrieve that key. You can only create a new one.

img Copy new API key

Setting up the OpenAI LLM in Unstract

Now that we have an API key from OpenAI, we can use it to set up an LLM profile on the Unstract platform. For this:

  • Sign in to the Unstract Platform
  • From the side navigation menu, choose Settings 🞂 LLMs
  • Click on the New LLM Profile button
  • From the list of LLMs, choose OpenAI. You should see a dialog box where you enter details.

img Add an OpenAI LLM

  • For Name,enter a name for this connector.
  • In the API Key field, paste the API key we created on the OpenAI website.
  • For Model, refer to OpenAI model names
  • Leave the Max retries,Timeout and the API Base field to their default values.
  • Click on Test Connection and ensure it succeeds. You can finally click on Submit and that should create a new LLM Profile for use in your Unstract projects.

We still need to create profiles for an Embedding Model, a Vector database and a Text Extractor. Let's continue doing that.