summaryrefslogtreecommitdiffstats
path: root/apps/settings/src
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-10-22 11:10:24 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-10-22 11:10:24 +0200
commit9787f9dba010f17bb53e88989716c94d677c0916 (patch)
tree7169560aee7c0504cba33a442cef6439ad621054 /apps/settings/src
parentcee5aa84f02de18084067a2e33e8d252f2362be4 (diff)
downloadnextcloud-server-9787f9dba010f17bb53e88989716c94d677c0916.tar.gz
nextcloud-server-9787f9dba010f17bb53e88989716c94d677c0916.zip
enh(Text2Image): Add AI settings section to text2image
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'apps/settings/src')
-rw-r--r--apps/settings/src/components/AdminAI.vue22
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/settings/src/components/AdminAI.vue b/apps/settings/src/components/AdminAI.vue
index 6a8b73d81f3..77755fdc0af 100644
--- a/apps/settings/src/components/AdminAI.vue
+++ b/apps/settings/src/components/AdminAI.vue
@@ -36,6 +36,24 @@
</NcCheckboxRadioSwitch>
</template>
</NcSettingsSection>
+ <NcSettingsSection :name="t('settings', 'Image generation')"
+ :description="t('settings', 'Image generation can be implemented by different apps. Here you can set which app should be used.')">
+ <template v-for="provider in text2imageProviders">
+ <NcCheckboxRadioSwitch :key="provider.class"
+ :checked.sync="settings['ai.text2image_provider']"
+ :value="provider.class"
+ name="text2image_provider"
+ type="radio"
+ @update:checked="saveChanges">
+ {{ provider.name }}
+ </NcCheckboxRadioSwitch>
+ </template>
+ <template v-if="!hasStt">
+ <NcCheckboxRadioSwitch disabled type="radio">
+ {{ t('settings', 'None of your currently installed apps provide image generation functionality') }}
+ </NcCheckboxRadioSwitch>
+ </template>
+ </NcSettingsSection>
<NcSettingsSection :name="t('settings', 'Text processing')"
:description="t('settings', 'Text processing tasks can be implemented by different apps. Here you can set which app should be used for which task.')">
<template v-for="type in tpTaskTypes">
@@ -100,6 +118,7 @@ export default {
translationProviders: loadState('settings', 'ai-translation-providers'),
textProcessingProviders: loadState('settings', 'ai-text-processing-providers'),
textProcessingTaskTypes: loadState('settings', 'ai-text-processing-task-types'),
+ text2imageProviders: loadState('settings', 'ai-text2image-providers'),
settings: loadState('settings', 'ai-settings'),
}
},
@@ -113,6 +132,9 @@ export default {
tpTaskTypes() {
return Object.keys(this.settings['ai.textprocessing_provider_preferences']).filter(type => !!this.getTaskType(type))
},
+ hasText2ImageProviders() {
+ return this.text2imageProviders.length > 0
+ }
},
methods: {
moveUp(i) {