mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
LLM OCP API: Fix type errors
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
(cherry picked from commit b6a95e35b0)
This commit is contained in:
parent
01db2cff5a
commit
dbd9420ebe
2 changed files with 24 additions and 4 deletions
|
|
@ -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(
|
||||
|
|
@ -26,6 +27,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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue