mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
73 lines
1.3 KiB
PHP
73 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace OCP\LanguageModel;
|
|
|
|
interface ILanguageModelTask extends \JsonSerializable {
|
|
public const STATUS_FAILED = 4;
|
|
public const STATUS_SUCCESSFUL = 3;
|
|
public const STATUS_RUNNING = 2;
|
|
public const STATUS_SCHEDULED = 1;
|
|
public const STATUS_UNKNOWN = 0;
|
|
|
|
public const TYPES = [
|
|
FreePromptTask::TYPE => FreePromptTask::class,
|
|
SummaryTask::TYPE => SummaryTask::class,
|
|
HeadlineTask::TYPE => HeadlineTask::class,
|
|
TopicsTask::TYPE => TopicsTask::class,
|
|
];
|
|
|
|
public function visitProvider(ILanguageModelProvider $provider): string;
|
|
|
|
public function canUseProvider(ILanguageModelProvider $provider): bool;
|
|
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getType(): string;
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getStatus(): int;
|
|
|
|
/**
|
|
* @param int $status
|
|
*/
|
|
public function setStatus(int $status): void;
|
|
|
|
/**
|
|
* @param int|null $id
|
|
*/
|
|
public function setId(?int $id): void;
|
|
|
|
/**
|
|
* @return int|null
|
|
*/
|
|
public function getId(): ?int;
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getInput(): string;
|
|
|
|
/**
|
|
* @param string|null $output
|
|
*/
|
|
public function setOutput(?string $output): void;
|
|
|
|
/**
|
|
* @return null|string
|
|
*/
|
|
public function getOutput(): ?string;
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getAppId(): string;
|
|
|
|
/**
|
|
* @return string|null
|
|
*/
|
|
public function getUserId(): ?string;
|
|
}
|