p61c fix
This commit is contained in:
@@ -962,6 +962,11 @@ final class AgentRunnerConfig
|
||||
*/
|
||||
public function getNoLlmMainDeviceRequestRoleKeywords(): array
|
||||
{
|
||||
$terms = $this->genreStringList('product_roles.no_llm_fallback_terms.main_device_request_keywords');
|
||||
if ($terms !== []) {
|
||||
return $terms;
|
||||
}
|
||||
|
||||
return $this->getConfiguredStringListOrVocabularyView(
|
||||
'no_llm_fallback.product_roles.main_device_request_keywords',
|
||||
'no_llm_fallback.product_roles.vocabulary_views.main_device_request_keywords'
|
||||
@@ -973,6 +978,11 @@ final class AgentRunnerConfig
|
||||
*/
|
||||
public function getNoLlmAccessoryProductRoleKeywords(): array
|
||||
{
|
||||
$terms = $this->genreStringList('product_roles.no_llm_fallback_terms.accessory_product_keywords');
|
||||
if ($terms !== []) {
|
||||
return $terms;
|
||||
}
|
||||
|
||||
return $this->getConfiguredStringListOrVocabularyView(
|
||||
'no_llm_fallback.product_roles.accessory_product_keywords',
|
||||
'no_llm_fallback.product_roles.vocabulary_views.accessory_product_keywords'
|
||||
@@ -1195,7 +1205,7 @@ final class AgentRunnerConfig
|
||||
public function getShopQueryPositiveTokenFilterMinTokens(): int
|
||||
{
|
||||
return $this->genreInt('shop_query_runtime.positive_token_filter.min_query_tokens_after_filter')
|
||||
?? $this->getOptionalInt('shop_runtime.query_cleanup.positive_token_filter.min_query_tokens_after_filter', 2);
|
||||
?? $this->getOptionalInt('shop_runtime.query_cleanup.positive_token_filter.min_query_tokens_after_filter', 1);
|
||||
}
|
||||
|
||||
public function shouldShopQueryPositiveTokenFilterIncludeCurrentInputPreservationTerms(): bool
|
||||
@@ -1508,6 +1518,24 @@ final class AgentRunnerConfig
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getShopQueryContextAnchorEnrichmentQueryTerms(): array
|
||||
{
|
||||
return $this->genreStringList('context_resolution.history_anchor_enrichment.query_terms')
|
||||
?: $this->getOptionalStringList('shop_runtime.context_resolution.history_anchor_enrichment.query_terms');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getShopQueryContextAnchorEnrichmentQueryNoiseTerms(): array
|
||||
{
|
||||
return $this->genreStringList('context_resolution.history_anchor_enrichment.query_noise_terms')
|
||||
?: $this->getOptionalStringList('shop_runtime.context_resolution.history_anchor_enrichment.query_noise_terms');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
|
||||
@@ -713,6 +713,8 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
'enabled' => $this->agentRunnerConfig->isShopQueryContextAnchorEnrichmentEnabled(),
|
||||
'max_query_terms' => $this->agentRunnerConfig->getShopQueryContextAnchorEnrichmentMaxQueryTerms(),
|
||||
'trigger_terms' => $this->agentRunnerConfig->getShopQueryContextAnchorEnrichmentTriggerTerms(),
|
||||
'query_terms' => $this->agentRunnerConfig->getShopQueryContextAnchorEnrichmentQueryTerms(),
|
||||
'query_noise_terms' => $this->agentRunnerConfig->getShopQueryContextAnchorEnrichmentQueryNoiseTerms(),
|
||||
'anchor_patterns' => $this->agentRunnerConfig->getShopQueryContextAnchorEnrichmentPatterns(),
|
||||
'template' => $this->agentRunnerConfig->getShopQueryContextAnchorEnrichmentTemplate(),
|
||||
],
|
||||
@@ -1871,6 +1873,8 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
$anchorEnrichment = $contextResolution['history_anchor_enrichment'] ?? [];
|
||||
if (is_array($anchorEnrichment)) {
|
||||
$this->validateStringList($this->toList($anchorEnrichment['trigger_terms'] ?? []), 'agent.shop_runtime.context_resolution.history_anchor_enrichment.trigger_terms', $errors, $warnings);
|
||||
$this->validateStringList($this->toList($anchorEnrichment['query_terms'] ?? []), 'agent.shop_runtime.context_resolution.history_anchor_enrichment.query_terms', $errors, $warnings);
|
||||
$this->validateStringList($this->toList($anchorEnrichment['query_noise_terms'] ?? []), 'agent.shop_runtime.context_resolution.history_anchor_enrichment.query_noise_terms', $errors, $warnings);
|
||||
$this->validateRegexPatternList($anchorEnrichment['anchor_patterns'] ?? [], 'agent.shop_runtime.context_resolution.history_anchor_enrichment.anchor_patterns', $errors);
|
||||
if (trim((string) ($anchorEnrichment['template'] ?? '')) === '') {
|
||||
$errors[] = 'agent.shop_runtime.context_resolution.history_anchor_enrichment.template must not be empty.';
|
||||
|
||||
Reference in New Issue
Block a user