summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJulien Veyssier <julien-nc@posteo.net>2023-08-03 23:11:29 +0200
committerJulien Veyssier <julien-nc@posteo.net>2023-08-09 14:58:02 +0200
commit8e657a894583c6276697dc03767a2c201a97fc1b (patch)
tree05860d8f2819e948d3c6d9a08ab7b79e238d4829 /lib/public
parent6eb18570c0822ed1d774c5243e153fd0ee406fd1 (diff)
downloadnextcloud-server-8e657a894583c6276697dc03767a2c201a97fc1b.tar.gz
nextcloud-server-8e657a894583c6276697dc03767a2c201a97fc1b.zip
allow anon text processing scheduling
add a textprocessing_tasks index convert anotations to method attributes refactor TP manager add mapper methods Signed-off-by: Julien Veyssier <julien-nc@posteo.net> (cherry picked from commit 41b19cf969956fe57fcb35e3dee0200d5c29b6d7) Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/TextProcessing/FreePromptTaskType.php2
-rw-r--r--lib/public/TextProcessing/IManager.php13
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/public/TextProcessing/FreePromptTaskType.php b/lib/public/TextProcessing/FreePromptTaskType.php
index a1e52e268a3..2cb8d6b7946 100644
--- a/lib/public/TextProcessing/FreePromptTaskType.php
+++ b/lib/public/TextProcessing/FreePromptTaskType.php
@@ -61,6 +61,6 @@ class FreePromptTaskType implements ITaskType {
* @since 27.1.0
*/
public function getDescription(): string {
- return $this->l->t('Runs an arbitrary prompt through the built-in language model.');
+ return $this->l->t('Runs an arbitrary prompt through the language model.');
}
}
diff --git a/lib/public/TextProcessing/IManager.php b/lib/public/TextProcessing/IManager.php
index c7b101ad510..00646528e68 100644
--- a/lib/public/TextProcessing/IManager.php
+++ b/lib/public/TextProcessing/IManager.php
@@ -82,10 +82,21 @@ interface IManager {
public function getTask(int $id): Task;
/**
+ * @param int $id The id of the task
+ * @param string|null $userId The user id that scheduled the task
+ * @return Task
+ * @throws RuntimeException If the query failed
+ * @throws NotFoundException If the task could not be found
+ * @since 27.1.0
+ */
+ public function getUserTask(int $id, ?string $userId): Task;
+
+ /**
* @param string $userId
* @param string $appId
* @param string|null $identifier
* @return array
+ * @since 27.1.0
*/
- public function getTasksByApp(string $userId, string $appId, ?string $identifier = null): array;
+ public function getUserTasksByApp(string $userId, string $appId, ?string $identifier = null): array;
}