From 7623c0ce079c3821324dae036c646afc7a74fc8e Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 5 Nov 2024 10:54:33 +0000 Subject: [PATCH 01/10] further AI config updates for case where there's no configuration --- .../builder/portal/settings/ai/index.svelte | 5 ++-- .../builder/portal/settings/index.svelte | 4 +-- packages/pro | 2 +- .../server/src/automations/steps/openai.ts | 18 +++++-------- .../src/utilities/rowProcessor/utils.ts | 2 +- .../src/api/controllers/global/configs.ts | 25 +++++++++++++------ 6 files changed, 31 insertions(+), 25 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/settings/ai/index.svelte b/packages/builder/src/pages/builder/portal/settings/ai/index.svelte index bbdf46a24e..ec0ff31e58 100644 --- a/packages/builder/src/pages/builder/portal/settings/ai/index.svelte +++ b/packages/builder/src/pages/builder/portal/settings/ai/index.svelte @@ -12,7 +12,7 @@ Tags, Tag, } from "@budibase/bbui" - import { admin, licensing } from "stores/portal" + import { admin, licensing, featureFlags } from "stores/portal" import { API } from "api" import AIConfigModal from "./ConfigModal.svelte" import AIConfigTile from "./AIConfigTile.svelte" @@ -27,7 +27,8 @@ let editingUuid $: isCloud = $admin.cloud - $: customAIConfigsEnabled = $licensing.customAIConfigsEnabled + $: customAIConfigsEnabled = + $featureFlags.AI_CUSTOM_CONFIGS && $licensing.customAIConfigsEnabled async function fetchAIConfig() { try { diff --git a/packages/builder/src/pages/builder/portal/settings/index.svelte b/packages/builder/src/pages/builder/portal/settings/index.svelte index 1448b43ec4..26688e3861 100644 --- a/packages/builder/src/pages/builder/portal/settings/index.svelte +++ b/packages/builder/src/pages/builder/portal/settings/index.svelte @@ -1,8 +1,8 @@