- Adding specialist configuration information to be added as arguments for retrievers.

This commit is contained in:
Josako
2025-08-03 18:31:42 +02:00
parent cea38e02d2
commit 212ea28de8
3 changed files with 9 additions and 37 deletions

View File

@@ -181,6 +181,15 @@ def prepare_arguments(specialist: Any, arguments: Dict[str, Any]) -> Dict[str, A
inherited_args['type'] = retriever.type
inherited_args['type_version'] = retriever.type_version
# Get arguments that are required from the specialist configuration
retriever_config = cache_manager.retrievers_config_cache.get_config(retriever.type, retriever.type_version)
retriever_required_args = retriever_config.get('arguments', {})
for req_arg_name, req_arg_config in retriever_required_args.items():
specialist_config_val = specialist.configuration.get(req_arg_name, None)
if specialist_config_val is not None:
inherited_args[req_arg_name] = specialist_config_val
# Validate the combined arguments
validate_retriever_arguments(
retriever.type, retriever.type_version,