New_Micro_Learning/backend/app/Modules/AI/Domain/AiProvider.php

24 خطوط
659 B
PHP

<?php
namespace App\Modules\AI\Domain;
interface AiProvider
{
public function id(): string;
public function external(): bool;
public function chat(string $prompt, ?string $systemPrompt = null): string;
/** @param list<array{id:string, locator:?string, heading:?string, content:string}> $fragments
* @param array<string, mixed> $options
* @return array<string, mixed>
*/
public function structure(array $fragments, array $options): array;
/** @param array<string, mixed> $context
* @return array<string, mixed>
*/
public function assist(string $operation, string $content, array $context): array;
}