- Adding specialist configuration information to be added as arguments for retrievers.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user