Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/admin/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ including what Instance Types are available and any limits that should be applie
- **Tables**

Provides a Team scoped shared SQL Relational Database (Requires specific configuration). More details [here](../user/ff-tables.md)
- **AI Features**

Global toggle for all AI functionality within the team. When disabled, all AI features below are unavailable regardless of their individual settings. Requires `ai.enabled: true` in the platform configuration.
- **Assistant Inline Code Completion**

Allows LLM assistance when writing Functions nodes (requires a token from FlowFuse Support and available to Enterprise License holders). More details [here](/docs/user/expert/)
Expand Down
6 changes: 6 additions & 0 deletions docs/install/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ Option | Description
`broker.url` | The full url to the platform broker. This is used by the platform and Node-RED instances to connect to the broker. For example: `mqtt://localhost:1883`.
`broker.public_url` | If set, this is the url provided to Devices to connect to the broker with. When running in a Docker or K8S environment, this url should be the externally addressable url the broker is provided on. This could be via WebSockets, for example: `ws://example.com:1884`

## AI Configuration

Option | Description
---------------|--------------
`ai.enabled` | Enables all AI features on the platform. When set to `false`, all AI functionality is disabled regardless of individual feature configuration (assistant, expert, inline completions, snapshot descriptions). Default: `true`

## FF Tables

Option | Description
Expand Down
10 changes: 9 additions & 1 deletion etc/flowforge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ driver:
# public_url: ws://localhost:4881


#################################################
# AI Configuration #
#################################################

# ai:
# enabled: true


#################################################
# Assistant Configuration #
#################################################
Expand Down Expand Up @@ -127,4 +135,4 @@ rate_limits:
# Create Default Admin #
#################################################
# create_admin: false
# create_admin_access_token: false
# create_admin_access_token: false
3 changes: 3 additions & 0 deletions forge/ee/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ module.exports = fp(async function (app, opts) {
// Expert
await app.register(require('./expert'))

// Set the AI Features Flag (global gate for all AI features)
app.config.features.register('ai', app.config?.ai?.enabled ?? true, true)

// Set the Generate Snapshot Description Feature Flag
app.config.features.register('generatedSnapshotDescription', true, true)

Expand Down
2 changes: 2 additions & 0 deletions forge/lib/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const featureList = [
'instanceResources',
'tables',
'certifiedNodes',
'ai',
'assistantInlineCompletions',
'generatedSnapshotDescription',
'ffNodes',
Expand Down Expand Up @@ -47,6 +48,7 @@ const featureNames = {
instanceResources: 'Instance Resources',
tables: 'Tables',
certifiedNodes: 'Certified Nodes',
ai: 'AI Features',
assistantInlineCompletions: 'Assistant Inline Code Completions',
generatedSnapshotDescription: 'Generate Snapshot Descriptions',
ffNodes: 'FlowFuse Exclusive Nodes',
Expand Down
15 changes: 12 additions & 3 deletions frontend/src/pages/admin/TeamTypes/dialogs/TeamTypeEditDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@
</div>
<div class="grid gap-3 grid-cols-2">
<template v-if="!input.properties.enableAllFeatures">
<FormRow v-for="(feature, index) in featureList" :key="index" v-model="input.properties.features[feature]" :disabled="input.properties.enableAllFeatures" type="checkbox">{{ featureNames[feature] }}</FormRow>
<FormRow v-for="(feature, index) in teamTypeFeatureList" :key="index" v-model="input.properties.features[feature]" :disabled="input.properties.enableAllFeatures" type="checkbox">{{ featureNames[feature] }}</FormRow>
<!-- to make the grid work nicely, only needed if there is an odd number of checkbox features above-->
<span v-if="featureList.length % 2 === 1" />
<span v-if="teamTypeFeatureList.length % 2 === 1" />
</template>
<FormRow v-model="input.properties.features.fileStorageLimit">Persistent File storage limit (Mb)</FormRow>
<FormRow v-model="input.properties.features.contextLimit">Persistent Context storage limit (Mb)</FormRow>
Expand Down Expand Up @@ -419,6 +419,14 @@ export default {
},
computed: {
...mapState(useAccountSettingsStore, ['features']),
teamTypeFeatureList () {
return this.featureList.filter(feature => {
if (!Object.prototype.hasOwnProperty.call(this.features, feature)) {
return true
}
return this.features[feature] !== false
})
},
formValid () {
return (this.input.name)
},
Expand All @@ -436,7 +444,8 @@ export default {
return !!this.features.billing
},
teamBrokerEnabled () {
return !!this.input.properties.features.teamBroker
const disabledOnPlatform = Object.prototype.hasOwnProperty.call(this.features, 'teamBroker') && this.features.teamBroker === false
return !disabledOnPlatform && !!this.input.properties.features.teamBroker
},
autoStackUpdateEnforced () {
return !!this.input.properties.autoStackUpdate?.enabled
Expand Down
1 change: 1 addition & 0 deletions frontend/src/stores/account-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const FEATURE_CONFIGS = [
{ output: 'isGitIntegrationFeatureEnabled', platformKey: 'gitIntegration', teamKey: 'gitIntegration' },
{ output: 'isInstanceResourcesFeatureEnabled', platformKey: 'instanceResources', teamKey: 'instanceResources' },
{ output: 'isTablesFeatureEnabled', platformKey: 'tables', teamKey: 'tables' },
{ output: 'isAiFeatureEnabled', platformKey: 'ai', teamKey: 'ai' },
{ output: 'isGeneratedSnapshotDescriptionFeatureEnabled', platformKey: 'generatedSnapshotDescription', teamKey: 'generatedSnapshotDescription' },
{ output: 'isApplicationsRBACFeatureEnabled', platformKey: 'rbacApplication', teamKey: 'rbacApplication' },

Expand Down
Loading