Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
| ChatAiService | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
2.50 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| chat | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Mbvb1223\ChatAiMulticlient; |
| 6 | |
| 7 | use Mbvb1223\ChatAiMulticlient\Clients\BaseClient; |
| 8 | |
| 9 | class ChatAiService |
| 10 | { |
| 11 | private BaseClient $client; |
| 12 | |
| 13 | public function __construct(BaseClient $client) |
| 14 | { |
| 15 | $this->client = $client; |
| 16 | } |
| 17 | |
| 18 | public function chat(string $prompt, string $model = null, array $options = []): string |
| 19 | { |
| 20 | return $this->client->chat($prompt, $model, $options); |
| 21 | } |
| 22 | } |