aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJulien Veyssier <julien-nc@posteo.net>2024-03-20 00:38:44 +0100
committerJulien Veyssier <julien-nc@posteo.net>2024-04-08 10:36:55 +0200
commit52de9ea5155ed80d1d52c3db8aceaa55dcc7a98d (patch)
tree8fdc9af78163a6ebf35c080560bcfa04a22fbf56 /apps
parent6528cdd78efb9b648a333462149bc4eff50187d3 (diff)
downloadnextcloud-server-52de9ea5155ed80d1d52c3db8aceaa55dcc7a98d.tar.gz
nextcloud-server-52de9ea5155ed80d1d52c3db8aceaa55dcc7a98d.zip
fix: when no AI setting has been set, make sure the selected text processing provider is the same as the one that will be used
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/lib/Settings/Admin/ArtificialIntelligence.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
index 0af82a74c5e..7a4a3538267 100644
--- a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
+++ b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
@@ -83,7 +83,9 @@ class ArtificialIntelligence implements IDelegatedSettings {
'name' => $provider->getName(),
'taskType' => $provider->getTaskType(),
];
- $textProcessingSettings[$provider->getTaskType()] = $provider::class;
+ if (!isset($textProcessingSettings[$provider->getTaskType()])) {
+ $textProcessingSettings[$provider->getTaskType()] = $provider::class;
+ }
}
$textProcessingTaskTypes = [];
foreach ($textProcessingSettings as $taskTypeClass => $providerClass) {