Skip to content

Commit

Permalink
fix: when no AI setting has been set, make sure the selected text pro…
Browse files Browse the repository at this point in the history
…cessing provider is the same as the one that will be used

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
  • Loading branch information
julien-nc committed Apr 8, 2024
1 parent 6528cdd commit 52de9ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ public function getForm() {
'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) {
Expand Down

0 comments on commit 52de9ea

Please sign in to comment.