1
0
Fork 0
mirror of synced 2024-09-24 21:31:17 +12:00

fix for setting default configs

This commit is contained in:
Martin McKeaveney 2024-09-18 09:44:33 +01:00
parent 8e2d21c85f
commit 2cf07a40f6
3 changed files with 5 additions and 3 deletions

View file

@ -56,10 +56,13 @@
} else { } else {
// We don't store the default BB AI config in the DB // We don't store the default BB AI config in the DB
delete fullAIConfig.config.budibase_ai delete fullAIConfig.config.budibase_ai
// unset the default value from other configs if default is set // unset the default value from other configs if default is set
if (editingAIConfig.isDefault) { if (editingAIConfig.isDefault) {
for (let key in fullAIConfig.config) { for (let key in fullAIConfig.config) {
fullAIConfig.config[key].isDefault = false if (key !== id) {
fullAIConfig.config[key].isDefault = false
}
} }
} }
// Add new or update existing custom AI Config // Add new or update existing custom AI Config

@ -1 +1 @@
Subproject commit 69633aa64b962ac4bad01360a421fe941a15fb2c Subproject commit 5daf17e32595e539f1f4a92b59a2ea2854d9dbd4

View file

@ -115,7 +115,6 @@ export async function run({
"OpenAI API Key not configured - please add the OPENAI_API_KEY environment variable.", "OpenAI API Key not configured - please add the OPENAI_API_KEY environment variable.",
} }
} }
response = await legacyOpenAIPrompt(inputs) response = await legacyOpenAIPrompt(inputs)
} }