p66
This commit is contained in:
@@ -4516,7 +4516,10 @@ final readonly class AgentRunner
|
||||
$noLlmMessage = $this->agentRunnerConfig->getProductionUiText('no_llm_history_default');
|
||||
}
|
||||
|
||||
$parts[] = 'Systemhinweis: ' . $noLlmMessage;
|
||||
$parts[] = $this->renderAgentTemplate(
|
||||
$this->agentRunnerConfig->getHistoryResponseSystemNoticeTemplate(),
|
||||
['message' => $noLlmMessage]
|
||||
);
|
||||
}
|
||||
|
||||
return trim(implode("\n\n", $parts));
|
||||
@@ -5015,7 +5018,10 @@ final readonly class AgentRunner
|
||||
|
||||
if (!$this->debug) {
|
||||
return $this->agentRunnerConfig->getGenericInternalErrorMessage()
|
||||
. '<br><small>Technischer Fehler: ' . $safeMessage . '</small>';
|
||||
. $this->renderAgentTemplate(
|
||||
$this->agentRunnerConfig->getTechnicalErrorDetailTemplate(),
|
||||
['message' => $safeMessage]
|
||||
);
|
||||
}
|
||||
|
||||
return $this->agentRunnerConfig->getDebugInternalErrorPrefix()
|
||||
|
||||
@@ -386,6 +386,15 @@ final class AgentRunnerConfig
|
||||
return $this->getRequiredString($legacyKey);
|
||||
}
|
||||
|
||||
private function getChatOnlyRequiredString(string $chatKey): string
|
||||
{
|
||||
if ($this->chatMessages === null) {
|
||||
throw new \InvalidArgumentException(sprintf('RetrieX chat messages config key "%s" is required.', $chatKey));
|
||||
}
|
||||
|
||||
return $this->chatMessages->getString($chatKey);
|
||||
}
|
||||
|
||||
private function getChatStringAllowEmpty(string $chatKey, string $legacyKey): string
|
||||
{
|
||||
if ($this->chatMessages !== null) {
|
||||
@@ -1045,6 +1054,16 @@ final class AgentRunnerConfig
|
||||
return $this->getChatRequiredString('agent.messages.debug_internal_error_prefix', 'messages.debug_internal_error_prefix');
|
||||
}
|
||||
|
||||
public function getTechnicalErrorDetailTemplate(): string
|
||||
{
|
||||
return $this->getChatOnlyRequiredString('agent.messages.technical_error_detail_template');
|
||||
}
|
||||
|
||||
public function getHistoryResponseSystemNoticeTemplate(): string
|
||||
{
|
||||
return $this->getChatOnlyRequiredString('agent.production_ui.templates.history_response_system_notice');
|
||||
}
|
||||
|
||||
public function getExternalUrlSourceLabel(): string
|
||||
{
|
||||
return $this->getChatRequiredString('agent.source_labels.external_url', 'source_labels.external_url');
|
||||
|
||||
@@ -298,6 +298,7 @@ final class ChatMessagesConfig
|
||||
'agent.messages.shop_query_optimization_heartbeat',
|
||||
'agent.messages.generic_internal_error',
|
||||
'agent.messages.debug_internal_error_prefix',
|
||||
'agent.messages.technical_error_detail_template',
|
||||
'agent.final_answer_guard.truncation_message',
|
||||
'agent.no_llm_fallback.messages.shop_only',
|
||||
'agent.no_llm_fallback.messages.shop_with_knowledge',
|
||||
@@ -419,6 +420,7 @@ final class ChatMessagesConfig
|
||||
'agent.production_ui.templates.shop_meta_result_count',
|
||||
'agent.production_ui.templates.history_notice_without_detail',
|
||||
'agent.production_ui.templates.history_notice_with_detail',
|
||||
'agent.production_ui.templates.history_response_system_notice',
|
||||
'agent.source_labels.external_url',
|
||||
'agent.source_labels.rag_knowledge',
|
||||
'agent.source_labels.conversation_history',
|
||||
|
||||
Reference in New Issue
Block a user