Follow-up-Precision-Fix
This commit is contained in:
@@ -58,6 +58,15 @@ final class ConfigDumpEffectiveCommand extends Command
|
||||
$retrieval = $this->section($config, 'retrieval');
|
||||
$vector = $this->section($config, 'vector');
|
||||
$commerce = $this->section($config, 'commerce');
|
||||
$prompt = $this->section($config, 'prompt');
|
||||
$agent = $this->section($config, 'agent');
|
||||
$intent = $this->section($config, 'intent');
|
||||
$vocabulary = $this->section($config, 'vocabulary');
|
||||
$searchRepair = $this->section($config, 'search_repair');
|
||||
$commerceQuery = $this->section($config, 'commerce_query');
|
||||
$shopMatching = $this->section($config, 'shop_matching');
|
||||
$language = $this->section($config, 'language');
|
||||
$queryEnrichment = $this->section($config, 'query_enrichment');
|
||||
|
||||
$io->section('Runtime');
|
||||
$io->definitionList(
|
||||
@@ -86,7 +95,8 @@ final class ConfigDumpEffectiveCommand extends Command
|
||||
$io->definitionList(
|
||||
['hard_max_chunks' => (string) ($retrieval['hard_max_chunks'] ?? '')],
|
||||
['hard_max_vectork' => (string) ($retrieval['hard_max_vectork'] ?? '')],
|
||||
['vector_score_threshold' => (string) ($retrieval['vector_score_threshold'] ?? '')]
|
||||
['vector_score_threshold' => (string) ($retrieval['vector_score_threshold'] ?? '')],
|
||||
['retrieval_vocabulary_lists' => (string) $this->countMapEntries($retrieval['vocabulary'] ?? [])]
|
||||
);
|
||||
|
||||
$io->section('Vector');
|
||||
@@ -100,7 +110,21 @@ final class ConfigDumpEffectiveCommand extends Command
|
||||
$io->definitionList(
|
||||
['enabled' => $this->formatBool($commerce['enabled'] ?? false)],
|
||||
['max_shop_results' => (string) ($commerce['max_shop_results'] ?? '')],
|
||||
['store_api_base_url' => (string) ($commerce['store_api_base_url'] ?? '')]
|
||||
['store_api_base_url' => (string) ($commerce['store_api_base_url'] ?? '')],
|
||||
['commerce_query_lists' => (string) $this->countMapEntries($commerceQuery)],
|
||||
['shop_matching_lists' => (string) $this->countMapEntries($shopMatching)],
|
||||
['search_repair_lists' => (string) $this->countMapEntries($searchRepair)]
|
||||
);
|
||||
|
||||
$io->section('Centralized YAML-backed configuration');
|
||||
$io->definitionList(
|
||||
['vocabulary_classes' => (string) $this->countMapEntries($this->section($vocabulary, 'classes'))],
|
||||
['vocabulary_views' => (string) $this->countMapEntries($this->section($vocabulary, 'views'))],
|
||||
['intent_sections' => (string) $this->countMapEntries($intent)],
|
||||
['prompt_rule_groups' => (string) $this->countMapEntries($this->section($prompt, 'rules'))],
|
||||
['agent_message_groups' => (string) $this->countMapEntries($this->section($agent, 'messages'))],
|
||||
['stopwords' => (string) $this->countListEntries($language['stopwords'] ?? [])],
|
||||
['query_enrichment_rules' => (string) $this->countMapEntries($queryEnrichment['rules'] ?? [])]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -117,4 +141,14 @@ final class ConfigDumpEffectiveCommand extends Command
|
||||
{
|
||||
return filter_var($value, FILTER_VALIDATE_BOOLEAN) ? 'yes' : 'no';
|
||||
}
|
||||
|
||||
private function countMapEntries(mixed $value): int
|
||||
{
|
||||
return is_array($value) ? count($value) : 0;
|
||||
}
|
||||
|
||||
private function countListEntries(mixed $value): int
|
||||
{
|
||||
return is_array($value) ? count($value) : 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user