blob: 7a318196ab3d2f25f8bdf196f72e07d7480f4b13 (
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
|
<?php
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Testing\Provider;
use OCP\TextProcessing\FreePromptTaskType;
use OCP\TextProcessing\IProvider;
use OCP\TextProcessing\ITaskType;
/** @template-implements IProvider<FreePromptTaskType|ITaskType> */
class FakeTextProcessingProvider implements IProvider {
public function getName(): string {
return 'Fake text processing provider (asynchronous)';
}
public function process(string $prompt): string {
return strrev($prompt) . ' (done with FakeTextProcessingProvider)';
}
public function getTaskType(): string {
return FreePromptTaskType::class;
}
}
|