fix for setting default configs
This commit is contained in:
parent
8e2d21c85f
commit
2cf07a40f6
|
@ -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
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue