diff options
author | Marcel Klehr <mklehr@gmx.net> | 2023-07-07 12:00:12 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2023-07-07 13:39:10 +0200 |
commit | de1cfaae9c4ff76baaf7185c79821e497099ea54 (patch) | |
tree | af653ae0a9706d1909b90df8a94cd96d908aa09e | |
parent | 8f1a4f42557302c7d1c97be0439c47e59133955a (diff) | |
download | nextcloud-server-de1cfaae9c4ff76baaf7185c79821e497099ea54.tar.gz nextcloud-server-de1cfaae9c4ff76baaf7185c79821e497099ea54.zip |
LLM OCP API: Fix psalm issues
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
-rw-r--r-- | core/Controller/LanguageModelApiController.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/Controller/LanguageModelApiController.php b/core/Controller/LanguageModelApiController.php index 335f16c2c05..a01fe268ab2 100644 --- a/core/Controller/LanguageModelApiController.php +++ b/core/Controller/LanguageModelApiController.php @@ -73,7 +73,7 @@ class LanguageModelApiController extends \OCP\AppFramework\OCSController { * @param string $type The task type * @param string $appId The originating app ID * @param string $identifier An identifier to identify this task - * @return DataResponse<Http::STATUS_OK,array{task: array{id: int,type:string,status: ILanguageModelTask::STATUS_*,userId: string, appId: string,input: string,output: string, identifier: string}},array{}>|DataResponse<Http::STATUS_PRECONDITION_FAILED,array{message: string}, array{}> + * @return DataResponse<Http::STATUS_OK,array{task: array{id: int,type:string,status: ILanguageModelTask::STATUS_*,userId: string, appId: string,input: string,output: string, identifier: string}},array{}>|DataResponse<Http::STATUS_PRECONDITION_FAILED|Http::STATUS_BAD_REQUEST,array{message: string}, array{}> * * 200: Task scheduled * 400: Task type does not exist @@ -89,7 +89,7 @@ class LanguageModelApiController extends \OCP\AppFramework\OCSController { $this->languageModelManager->scheduleTask($task); return new DataResponse([ - 'task' => $task, + 'task' => $task->jsonSerialize(), ]); } catch (PreConditionNotMetException) { return new DataResponse(['message' => $this->l->t('Necessary language model provider is not available')], Http::STATUS_PRECONDITION_FAILED); @@ -102,7 +102,7 @@ class LanguageModelApiController extends \OCP\AppFramework\OCSController { * * @PublicPage * @param int $id The id of the task - * @return DataResponse<Htpp::STATUS_NOT_FOUND|Http::STATUS_INTERNAL_SERVER_ERROR, array{message:string}>|DataResponse<Http::STATUS_OK,array{task: array{id: int,type:string,status: ILanguageModelTask::STATUS_*,userId: string, appId: string,input: string,output: string, identifier: string}},array{}> + * @return DataResponse<Http::STATUS_NOT_FOUND|Http::STATUS_INTERNAL_SERVER_ERROR, array{message:string}>|DataResponse<Http::STATUS_OK,array{task: array{id: int,type:string,status: ILanguageModelTask::STATUS_*,userId: string, appId: string,input: string,output: string, identifier: string}},array{}> * * 200: Task returned * 404: Task not found |