How to enable and configure the AI field in Baserow

Banner image for article on enabling and configuring the AI field in Baserow

The AI field in Baserow is a powerful feature that allows you to integrate AI models directly within your workspace, enabling capabilities such as generating creative briefs, summarizing information, and more.

Baserow is model-agnostic, which means that you can use your preferred LLM without being tied to any single LLM. Instead, Baserow gives you the freedom and flexibility to choose and switch AI models at any time.

What we’ll do

In this tutorial, we’ll walk you through the steps to configure and set up the AI field, ensuring you can leverage these advanced functionalities seamlessly. We’ll cover the following steps:

Prerequisites

To complete this tutorial, you’ll need the following:

  • A Baserow account with a Premium plan or higher.
  • Access to a Baserow workspace and table.
  • Access to the workspace settings if you are configuring at the workspace level.
  • Your preferred model’s API keys. In this tutorial, we’ll be using OpenAI as the example.

Let’s dive in!

Configure and set up the AI field

1. Access the table

Log in to your existing Baserow account or create a new account if you don’t have one already.

Once you log in, you can access the dashboard to add workspaces and databases. You can work with an existing workspace, database, or table, or set up a new workspace from scratch.

Navigate to the table where you want to enable the AI field.

2. Configure AI API Keys

If you’re using Baserow Cloud (baserow.io), the GPT-3.5 model is available for free with no usage limitations. For Baserow Self-Hosted, you’ll need to provide your own OpenAI API key.

For Baserow Cloud:

  1. Go to the workspace settings.
  2. Select the “Generative AI Settings” tab.
  3. No further configuration is needed for the cloud version, as the GPT-3.5 model is enabled by default.

Leaving any configuration value blank will default back to the global instance settings.

For Baserow Self-Hosted:

You need to add your OpenAI API key to use the AI field type. API keys are configured at the workspace or instance level.

  1. Obtain your OpenAI API key from the OpenAI website.
  2. In Baserow, navigate to the “Generative AI settings” tab within workspace settings.
  3. Enter your OpenAI API key in the designated field.
  4. Optionally, provide an OpenAI organization name and a comma-separated list of OpenAI models (e.g., gpt-3.5-turbo,gpt-4-turbo-preview) to enable those specific models.

Alternatively, if you prefer to configure API keys at the instance level, you can do so via environment variables. This is done by setting the necessary environment variables in your server configuration file.

Configure AI API Keys

3. Enable the AI field

In the workspace, open the table where you want to add the AI field.

  1. Click the “+ Add a field” button.
  2. From the list of field types, select “AI Field”.
  3. A configuration window will appear. Here, you can select the AI type and model from the dropdown list. Ensure you have selected the appropriate model that matches your API key configuration.

If the AI field is not working, ensure that your API key is correctly configured and that you have selected a supported model.

4. Configure the AI field

Click on the “Prompt” field in the context menu. A new window will appear, showing a list of fields in your table.

Type your desired prompt. This prompt will guide the AI in generating content.

As you type, select the relevant fields from your table that you want to use in the prompt.

Enable the AI field

5. Save and use the AI field

Once you have configured your prompt, click the blue Create button.

The AI field will now be added to your table. Each cell in this field will display a “Generate” button.

To use the AI field, click the “Generate” button in the cell where you want the AI to start generating content based on your prompt.

Summary

By following these steps, you can enable and configure the AI field in Baserow, whether you are using Baserow cloud or Baserow self-hosted. This functionality opens up new possibilities for automating tasks, generating content, and enhancing productivity within your workspace. Experiment with different prompts and models to fully leverage the power of generative AI in your Baserow tables.

Other useful resources

The following articles may also be helpful:

In case you’ve run into an issue while following this tutorial, feel free to reach out to ask for help in the Baserow community.