feat: Enhance Support Reply Service with tone instructions and article details
- 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.
This commit is contained in:
@@ -19,6 +19,7 @@ class TicketShowPageTest extends TestCase
|
||||
'message' => 'vraag',
|
||||
'status' => 'completed',
|
||||
'best_article_id' => $article->id,
|
||||
'confidence' => 0.9,
|
||||
'support_reply' => 'Gebruik deze stappen',
|
||||
'result_payload' => [
|
||||
'quick_reply' => ['id' => 1, 'title' => 'DNS Quick'],
|
||||
@@ -39,5 +40,23 @@ class TicketShowPageTest extends TestCase
|
||||
$response->assertOk();
|
||||
$response->assertSee('Snelantwoord gebruikt', false);
|
||||
$response->assertSee('Toolcalls', false);
|
||||
$response->assertSee('haalt drempel', false);
|
||||
}
|
||||
|
||||
public function test_ticket_show_marks_confidence_below_threshold(): void
|
||||
{
|
||||
$article = Article::query()->create(['title' => 'DNS', 'content' => 'x']);
|
||||
$ticket = Ticket::query()->create([
|
||||
'message' => 'vraag',
|
||||
'status' => 'completed',
|
||||
'best_article_id' => $article->id,
|
||||
'confidence' => 0.25,
|
||||
]);
|
||||
|
||||
$response = $this->get("/admin/tickets/{$ticket->id}");
|
||||
|
||||
$response->assertOk();
|
||||
$response->assertSee('Confidence 0.25', false);
|
||||
$response->assertSee('onder drempel 0.45', false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user