26 lines
592 B
PHP
Executable File
26 lines
592 B
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services\Ai;
|
|
|
|
interface AiServiceInterface
|
|
{
|
|
/**
|
|
* Generate a prompt using the AI provider.
|
|
*
|
|
* @param array<string, mixed> $data
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function generatePrompt(array $data): array;
|
|
|
|
/**
|
|
* Send a chat conversation to the AI provider.
|
|
*
|
|
* @param array<int, array{role: string, content: string}> $messages
|
|
* @param array<string, mixed> $data
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function chat(array $messages, array $data = []): array;
|
|
}
|