summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-06-20 15:45:18 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-08-09 10:00:07 +0200
commitdbd9420ebebef418bd985a7d325829ae8802b795 (patch)
tree56533e2f793f5ddd044b7975cd91f280c4d1c8a9 /lib
parent01db2cff5a8df0909a229be77043428fcb4e3960 (diff)
downloadnextcloud-server-dbd9420ebebef418bd985a7d325829ae8802b795.tar.gz
nextcloud-server-dbd9420ebebef418bd985a7d325829ae8802b795.zip
LLM OCP API: Fix type errors
Signed-off-by: Marcel Klehr <mklehr@gmx.net> (cherry picked from commit b6a95e35b0583c2dfc87bf80067c1bdcd51431ca)
Diffstat (limited to 'lib')
-rw-r--r--lib/public/LanguageModel/AbstractLanguageModelTask.php15
-rw-r--r--lib/public/LanguageModel/ILanguageModelTask.php13
2 files changed, 24 insertions, 4 deletions
diff --git a/lib/public/LanguageModel/AbstractLanguageModelTask.php b/lib/public/LanguageModel/AbstractLanguageModelTask.php
index f1834cdf058..ff54277c840 100644
--- a/lib/public/LanguageModel/AbstractLanguageModelTask.php
+++ b/lib/public/LanguageModel/AbstractLanguageModelTask.php
@@ -6,6 +6,7 @@ use OC\LanguageModel\Db\Task;
abstract class AbstractLanguageModelTask implements ILanguageModelTask {
protected ?int $id;
+ protected ?string $output;
protected int $status = ILanguageModelTask::STATUS_UNKNOWN;
final public function __construct(
@@ -27,6 +28,20 @@ abstract class AbstractLanguageModelTask implements ILanguageModelTask {
abstract public function getType(): string;
/**
+ * @return string|null
+ */
+ final public function getOutput(): ?string {
+ return $this->output;
+ }
+
+ /**
+ * @param string|null $output
+ */
+ final public function setOutput(?string $output): void {
+ $this->output = $output;
+ }
+
+ /**
* @return int
*/
final public function getStatus(): int {
diff --git a/lib/public/LanguageModel/ILanguageModelTask.php b/lib/public/LanguageModel/ILanguageModelTask.php
index 3775546d4f0..816dcf7dc1c 100644
--- a/lib/public/LanguageModel/ILanguageModelTask.php
+++ b/lib/public/LanguageModel/ILanguageModelTask.php
@@ -16,6 +16,11 @@ interface ILanguageModelTask extends \JsonSerializable {
TopicsTask::TYPE => TopicsTask::class,
];
+ public function visitProvider(ILanguageModelProvider $provider): string;
+
+ public function canUseProvider(ILanguageModelProvider $provider): bool;
+
+
/**
* @return string
*/
@@ -47,14 +52,14 @@ interface ILanguageModelTask extends \JsonSerializable {
public function getInput(): string;
/**
- * @param string $output
+ * @param string|null $output
*/
- public function setOutput(string $output): void;
+ public function setOutput(?string $output): void;
/**
- * @return string
+ * @return null|string
*/
- public function getOutput(): string;
+ public function getOutput(): ?string;
/**
* @return string