Closed shogunpurple closed 1 month ago
Doing a thorough review now, but the first snag I hit after generating a license to test this is that attempting to save a row (in a random table with no AI columns) threw an error The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).
So I assume other self hosters on non-free licenses would also hit this. We should probably fail gracefully if you aren't using any AI features and so don't have any AI configs set up. Also possible I just did something wrong.
Edit: what's the correct way to get AI up and running? The default Budibase AI config is present and enabled but can't be configured, and I've tried adding the OPENAI_API_KEY
env var but that didn't work either. Would just like to test the feature properly 👌
Doing a thorough review now, but the first snag I hit after generating a license to test this is that attempting to save a row (in a random table with no AI columns) threw an error
The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).
So I assume other self hosters on non-free licenses would also hit this. We should probably fail gracefully if you aren't using any AI features and so don't have any AI configs set up. Also possible I just did something wrong.Edit: what's the correct way to get AI up and running? The default Budibase AI config is present and enabled but can't be configured, and I've tried adding the
OPENAI_API_KEY
env var but that didn't work either. Would just like to test the feature properly 👌
@aptkingston This happens because the license generation on self host/dev env gives all the features - including Budibase AI (the cloud config) and custom configs. So it assumes you have the cloud config switched on, and tries to go to OpenAI. If you add OPENAI_API_KEY
to your .env
in server and restart, you should be able to use the AI features as normal.
@aptkingston thanks for the review - they have all been addressed, some nice catches there 🙏
Description
This PR contains the new budibase AI column - a new column type that allows you to specify a function to be carried out by an LLM, pass in some of your row data, and have the LLM write the prompt into the Budibase DB. The AI functions Budibase provides are as follows:
AI columns are generated when you save a new row, edit it, or use the right click context menu to generate the columns for a previously saved row.
Pro PR: https://github.com/Budibase/budibase-pro/pull/322
Addresses
Screenshots
Launchcontrol
The budibase AI column allows you to perform LLM operations over your data - summarise text, run translations, perform sentiment analysis and much more simply by creating an AI column and saving/editing your data. You can also generate data from rows saved previously by right clicking and using the "Generate AI Columns" functionality on your row.