p33b
This commit is contained in:
@@ -196,6 +196,11 @@ final class NdjsonHybridRetrieverConfig
|
||||
return $this->requiredStringList('exact_detail_tokens');
|
||||
}
|
||||
|
||||
public function genericExactSelectionCleanupProfile(): string
|
||||
{
|
||||
return $this->requiredString('generic_exact_selection_cleanup_profile');
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
public function genericExactSelectionTokens(): array
|
||||
{
|
||||
@@ -316,6 +321,7 @@ final class NdjsonHybridRetrieverConfig
|
||||
'exact_selection_indicator_table_required_primary_terms' => $this->exactSelectionIndicatorTableRequiredPrimaryTerms(),
|
||||
'exact_selection_indicator_table_required_context_terms' => $this->exactSelectionIndicatorTableRequiredContextTerms(),
|
||||
'exact_detail_tokens' => $this->exactDetailTokens(),
|
||||
'generic_exact_selection_cleanup_profile' => $this->genericExactSelectionCleanupProfile(),
|
||||
'generic_exact_selection_tokens' => $this->genericExactSelectionTokens(),
|
||||
'generic_product_tokens' => $this->genericProductTokens(),
|
||||
'important_short_model_tokens' => $this->importantShortModelTokens(),
|
||||
@@ -369,6 +375,22 @@ final class NdjsonHybridRetrieverConfig
|
||||
return $value;
|
||||
}
|
||||
|
||||
private function requiredString(string $key): string
|
||||
{
|
||||
$value = $this->requiredValue($key);
|
||||
|
||||
if (!is_scalar($value)) {
|
||||
throw $this->invalid($key, 'must be a non-empty string');
|
||||
}
|
||||
|
||||
$value = trim((string) $value);
|
||||
if ($value === '') {
|
||||
throw $this->invalid($key, 'must be a non-empty string');
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
private function requiredStringList(string $key): array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user