- Added tone instruction retrieval to SupportReplyService. - Improved user feedback when no relevant article is found. - Included article URL and tone instruction in LLM prompt. - Updated response format to include source information. - Enhanced article management UI with search functionality and editing capabilities. - Introduced a new API endpoint for nearest articles based on vector search. - Added confidence badge component to display article confidence levels. - Implemented tests for article searching, editing, and nearest article API. - Removed obsolete .htaccess file.
18 lines
484 B
PHP
18 lines
484 B
PHP
<?php
|
|
|
|
namespace Tests\Fakes;
|
|
|
|
use App\DTOs\ArticleCandidateDTO;
|
|
use App\Repositories\Contracts\ArticleRepositoryInterface;
|
|
|
|
class FakeArticleRepository implements ArticleRepositoryInterface
|
|
{
|
|
/** @var array<int, ArticleCandidateDTO> */
|
|
public array $candidates = [];
|
|
|
|
public function findSimilarByEmbedding(array $embedding, int $limit = 5, array $embeddingContext = [], array $filters = []): array
|
|
{
|
|
return array_slice($this->candidates, 0, $limit);
|
|
}
|
|
}
|