Files
TicketAssistent/resources/views/components/admin/confidence-badge.blade.php
your name 9244899f9b 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.
2026-05-13 22:25:45 +02:00

26 lines
737 B
PHP

@props([
'confidence',
'threshold' => \App\Services\KnowledgeGapService::CONFIDENCE_THRESHOLD,
])
@php
$score = (float) $confidence;
$passes = $score >= (float) $threshold;
@endphp
<span @class([
'inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium',
'bg-green-100 text-green-800' => $passes,
'bg-amber-100 text-amber-900' => ! $passes,
])>
<span @class([
'h-2 w-2 rounded-full',
'bg-green-600' => $passes,
'bg-amber-600' => ! $passes,
])></span>
Confidence {{ number_format($score, 2) }}
<span class="text-[11px] opacity-80">
{{ $passes ? 'haalt drempel' : 'onder drempel' }} {{ number_format((float) $threshold, 2) }}
</span>
</span>