patch 20i
This commit is contained in:
@@ -721,6 +721,14 @@ final class AgentRunnerConfig
|
||||
return $this->getRequiredStringList('shop_prompt.conversation_context_rules');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getShopQueryContextUsageReferentialTerms(): array
|
||||
{
|
||||
return $this->getRequiredStringList('shop_prompt.context_usage.referential_terms');
|
||||
}
|
||||
|
||||
public function getShopPromptIntro(): string
|
||||
{
|
||||
return $this->getRequiredString('shop_prompt.intro');
|
||||
|
||||
@@ -529,6 +529,9 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
'language_markers' => $this->agentRunnerConfig->getShopQueryLanguageMarkers(),
|
||||
'translation_replacements_de' => $this->agentRunnerConfig->getShopQueryTranslationReplacements('de'),
|
||||
],
|
||||
'context_usage' => [
|
||||
'referential_terms' => $this->agentRunnerConfig->getShopQueryContextUsageReferentialTerms(),
|
||||
],
|
||||
'context_anchor_enrichment' => [
|
||||
'enabled' => $this->agentRunnerConfig->isShopQueryContextAnchorEnrichmentEnabled(),
|
||||
'max_query_terms' => $this->agentRunnerConfig->getShopQueryContextAnchorEnrichmentMaxQueryTerms(),
|
||||
@@ -1132,6 +1135,11 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
$errors[] = 'agent.input_normalization.prompt.current_user_input_label must not be empty.';
|
||||
}
|
||||
|
||||
$contextUsage = $agent['shop_query_optimizer']['context_usage'] ?? [];
|
||||
if (is_array($contextUsage)) {
|
||||
$this->validateStringList($this->toList($contextUsage['referential_terms'] ?? []), 'agent.shop_query_optimizer.context_usage.referential_terms', $errors, $warnings);
|
||||
}
|
||||
|
||||
$anchorEnrichment = $agent['shop_query_optimizer']['context_anchor_enrichment'] ?? [];
|
||||
if (is_array($anchorEnrichment)) {
|
||||
$this->validateStringList($this->toList($anchorEnrichment['trigger_terms'] ?? []), 'agent.shop_query_optimizer.context_anchor_enrichment.trigger_terms', $errors, $warnings);
|
||||
|
||||
Reference in New Issue
Block a user