-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Part 2 of 2 - Budi 8608 ai platform level config #14602
base: master
Are you sure you want to change the base?
Conversation
…ai-platform-level-config-pt-2
…Budibase/budibase into budi-8608-ai-platform-level-config-pt-2
// unset the default value from other configs if default is set | ||
if (editingAIConfig.isDefault) { | ||
for (let key in fullAIConfig.config) { | ||
fullAIConfig.config[key].isDefault = false | ||
if (key !== id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand this change. The old code looks correct, what does this fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it iterates through all the configs, It unsets the new one you actually want to set to default back to false
, so it needs to know not to do that
for (const key in scopedConfig.config) { | ||
if (scopedConfig.config[key].apiKey) { | ||
scopedConfig.config[key].apiKey = PASSWORD_REPLACEMENT | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a test to prevent us ever breaking this behaviour by accident.
Description
This PR allows budibase to inject the AI configs that can be created with #14543 into LLM providers. Right now, the only place we have AI in the platform is in automations, so support is provided there to allow users who already use the OpenAI integration to continue as is, but users who have access to Budibase AI on paid plans can use custom configs, such as Anthropic instead of OpenAI.
All the LLM code (a majority of this work) is wrapped up in this budibase pro repo. There's further context there on how the LLM integration works, but I tried to keep it as abstracted as possible (including reading the config etc) in pro, so it can just be pulled in and used in a few lines anywhere in the platform that we need AI, and has a dependency on
@budibase/pro
.https://github.com/Budibase/budibase-pro/pull/320
Addresses
https://linear.app/budibase/issue/BUDI-8608/ai-platform-level-config
There are 2 parts to the above:
Launchcontrol
Add the ability to use custom AI configs and the built in budibase AI in cloud for automations