blob: c577d9c653b968334c04a1b266b4f11515a6e3ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<?php
namespace OCP\LanguageModel;
use RuntimeException;
/**
* @since 28.0.0
*/
final class FreePromptTask extends AbstractLanguageModelTask {
/**
* @since 28.0.0
*/
public const TYPE = 'free_prompt';
/**
* @inheritDoc
*/
public function visitProvider(ILanguageModelProvider $provider): string {
return $provider->prompt($this->getInput());
}
public function canUseProvider(ILanguageModelProvider $provider): bool {
return true;
}
public function getType(): string {
return self::TYPE;
}
}
|