p63
This commit is contained in:
@@ -18,6 +18,7 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
private NdjsonHybridRetrieverConfig $retrieverConfig,
|
||||
private DomainVocabularyConfig $domainVocabularyConfig,
|
||||
private AgentRunnerConfig $agentRunnerConfig,
|
||||
private ChatMessagesConfig $chatMessagesConfig,
|
||||
private SearchRepairConfig $searchRepairConfig,
|
||||
private CommerceIntentConfig $commerceIntentConfig,
|
||||
private CommerceQueryParserConfig $commerceQueryParserConfig,
|
||||
@@ -52,6 +53,7 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
'retrieval' => $this->retrievalConfig(),
|
||||
'prompt' => $this->promptConfig(),
|
||||
'agent' => $this->agentConfig(),
|
||||
'chat_messages' => $this->chatMessagesConfig(),
|
||||
'vector' => $this->vectorConfig(),
|
||||
'commerce' => $this->commerceConfig(),
|
||||
'commerce_query' => $this->commerceQueryConfig(),
|
||||
@@ -86,6 +88,7 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
$this->validateRetrieval($config['retrieval'], $errors, $warnings);
|
||||
$this->validatePrompt($config['prompt'], $errors, $warnings);
|
||||
$this->validateAgent($config['agent'], $errors, $warnings);
|
||||
$this->validateChatMessages($errors);
|
||||
$this->validateVector($config['vector'], $errors, $warnings);
|
||||
$this->validateCommerce($config['commerce'], $errors, $warnings);
|
||||
$this->validateCommerceQuery($config['commerce_query'], $errors, $warnings);
|
||||
@@ -602,6 +605,21 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
];
|
||||
}
|
||||
|
||||
/** @return array<string, mixed> */
|
||||
private function chatMessagesConfig(): array
|
||||
{
|
||||
return $this->chatMessagesConfig->toArray();
|
||||
}
|
||||
|
||||
private function validateChatMessages(array &$errors): void
|
||||
{
|
||||
$validation = $this->chatMessagesConfig->validate();
|
||||
|
||||
foreach ($validation['errors'] as $error) {
|
||||
$errors[] = $error;
|
||||
}
|
||||
}
|
||||
|
||||
/** @return array<string, mixed> */
|
||||
private function agentConfig(): array
|
||||
{
|
||||
@@ -1429,6 +1447,7 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
{
|
||||
$configRoots = [
|
||||
'retriex.agent.config' => 'agent',
|
||||
'retriex.chat_messages.config' => 'chat_messages',
|
||||
'retriex.commerce_query.config' => 'commerce_query',
|
||||
'retriex.governance.config' => 'governance',
|
||||
'retriex.intent.commerce.config' => 'intent.commerce',
|
||||
|
||||
Reference in New Issue
Block a user