@@ -56,7 +56,8 @@ public function getProviders(): array;
5656 public function getAvailableTaskTypes (): array ;
5757
5858 /**
59- * @param Task $task The task to run
59+ * @psalm-template T of ITaskType
60+ * @param Task<T> $task The task to run
6061 * @throws PreConditionNotMetException If no or not the requested provider was registered but this method was still called
6162 * @throws TaskFailureException If running the task failed
6263 * @since 27.1.0
@@ -68,7 +69,8 @@ public function runTask(Task $task): string;
6869 * with the \OCP\LanguageModel\Events\TaskSuccessfulEvent
6970 * If inference fails a \OCP\LanguageModel\Events\TaskFailedEvent will be dispatched instead
7071 *
71- * @param Task $task The task to schedule
72+ * @psalm-template T of ITaskType
73+ * @param Task<T> $task The task to schedule
7274 * @throws PreConditionNotMetException If no or not the requested provider was registered but this method was still called
7375 * @throws Exception storing the task in the database failed
7476 * @since 27.1.0
@@ -80,7 +82,8 @@ public function scheduleTask(Task $task) : void;
8082 * max execution time of this php process and run it synchronously if it does, if it doesn't fit (or the provider doesn't provide that information)
8183 * execution is deferred to a background job
8284 *
83- * @param Task $task The task to schedule
85+ * @psalm-template T of ITaskType
86+ * @param Task<T> $task The task to schedule
8487 * @returns bool A boolean indicating whether the task was run synchronously (`true`) or offloaded to a background job (`false`)
8588 * @throws PreConditionNotMetException If no or not the requested provider was registered but this method was still called
8689 * @throws TaskFailureException If running the task failed
@@ -92,7 +95,8 @@ public function runOrScheduleTask(Task $task): bool;
9295 /**
9396 * Delete a task that has been scheduled before
9497 *
95- * @param Task $task The task to delete
98+ * @psalm-template T of ITaskType
99+ * @param Task<T> $task The task to delete
96100 * @since 27.1.0
97101 */
98102 public function deleteTask (Task $ task ): void ;
0 commit comments