diff options
author | Julien Veyssier <julien-nc@posteo.net> | 2024-07-17 15:23:18 +0200 |
---|---|---|
committer | Julien Veyssier <julien-nc@posteo.net> | 2024-07-17 15:24:19 +0200 |
commit | 183726a299356e3ced6ad3b54ffe5f6d5273c896 (patch) | |
tree | 8d025dc38b6f25946a4cd5b5ed5938f6eae8a96a /lib/private/TaskProcessing | |
parent | d37dd4b9a96d4316aa95d2e0ba0a0ec451de4ea7 (diff) | |
download | nextcloud-server-183726a299356e3ced6ad3b54ffe5f6d5273c896.tar.gz nextcloud-server-183726a299356e3ced6ad3b54ffe5f6d5273c896.zip |
feat(settings/admin/ai): fix provider list not being declared
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Diffstat (limited to 'lib/private/TaskProcessing')
-rw-r--r-- | lib/private/TaskProcessing/Manager.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php index 834ca488033..f720776a239 100644 --- a/lib/private/TaskProcessing/Manager.php +++ b/lib/private/TaskProcessing/Manager.php @@ -501,8 +501,8 @@ class Manager implements IManager { public function getPreferredProvider(string $taskType) { try { $preferences = json_decode($this->config->getAppValue('core', 'ai.taskprocessing_provider_preferences', 'null'), associative: true, flags: JSON_THROW_ON_ERROR); + $providers = $this->getProviders(); if (isset($preferences[$taskType])) { - $providers = $this->getProviders(); $provider = current(array_values(array_filter($providers, fn ($provider) => $provider->getId() === $preferences[$taskType]))); if ($provider !== false) { return $provider; |