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:
@@ -130,6 +130,20 @@ class AppSettingsService
|
||||
return $default;
|
||||
}
|
||||
|
||||
public function toneAddressing(): string
|
||||
{
|
||||
return $this->get('tone_addressing', 'je') === 'u' ? 'u' : 'je';
|
||||
}
|
||||
|
||||
public function toneInstruction(): string
|
||||
{
|
||||
if ($this->toneAddressing() === 'u') {
|
||||
return 'Als de klanttaal Nederlands is: spreek de klant consequent formeel aan met u/uw. Gebruik geen je/jij/jouw.';
|
||||
}
|
||||
|
||||
return 'Als de klanttaal Nederlands is: spreek de klant consequent informeel aan met je/jij/jouw. Gebruik geen u/uw.';
|
||||
}
|
||||
|
||||
public function promptSettings(): array
|
||||
{
|
||||
$settings = $this->all();
|
||||
|
||||
Reference in New Issue
Block a user