blob: 180d778b34cd016bb52b1de01040644c5d19095f (
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
31
32
33
34
|
<?php
namespace OCP\LanguageModel;
/**
* @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());
}
/**
* @inheritDoc
*/
public function canUseProvider(ILanguageModelProvider $provider): bool {
return true;
}
/**
* @inheritDoc
*/
public function getType(): string {
return self::TYPE;
}
}
|