diff options
author | Julien Veyssier <julien-nc@posteo.net> | 2024-03-05 11:03:58 +0100 |
---|---|---|
committer | Julien Veyssier <julien-nc@posteo.net> | 2024-03-15 13:17:29 +0100 |
commit | ba94de2510b3858f10d60f0230a58b1252346372 (patch) | |
tree | 19e3b8d25369d885eda8799633a93e6c29227d9f /apps/settings/lib/Settings | |
parent | 0379a8d7a92f1f3a6ad3639f504bfe9fbea86915 (diff) | |
download | nextcloud-server-ba94de2510b3858f10d60f0230a58b1252346372.tar.gz nextcloud-server-ba94de2510b3858f10d60f0230a58b1252346372.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/settings/lib/Settings')
-rw-r--r-- | apps/settings/lib/Settings/Admin/ArtificialIntelligence.php | 4 |
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 20d395ba4d7..41b9e837c7e 100644 --- a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php +++ b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php @@ -86,7 +86,9 @@ class ArtificialIntelligence implements IDelegatedSettings { 'name' => $provider->getName(), 'taskType' => $provider->getTaskType(), ]; - $textProcessingSettings[$provider->getTaskType()] = $provider instanceof IProviderWithId ? $provider->getId() : $provider::class; + if (!isset($textProcessingSettings[$provider->getTaskType()])) { + $textProcessingSettings[$provider->getTaskType()] = $provider instanceof IProviderWithId ? $provider->getId() : $provider::class; + } } $textProcessingTaskTypes = []; foreach ($textProcessingSettings as $taskTypeClass => $providerClass) { |