- Adding specialist configuration information to be added as arguments for retrievers.
This commit is contained in:
@@ -1,31 +0,0 @@
|
|||||||
version: "1.0.0"
|
|
||||||
name: "Retrieves vacancy text for a specific role"
|
|
||||||
configuration:
|
|
||||||
es_k:
|
|
||||||
name: "es_k"
|
|
||||||
type: "integer"
|
|
||||||
description: "K-value to retrieve embeddings (max embeddings retrieved)"
|
|
||||||
required: true
|
|
||||||
default: 8
|
|
||||||
es_similarity_threshold:
|
|
||||||
name: "es_similarity_threshold"
|
|
||||||
type: "float"
|
|
||||||
description: "Similarity threshold for retrieving embeddings"
|
|
||||||
required: true
|
|
||||||
default: 0.3
|
|
||||||
arguments:
|
|
||||||
query:
|
|
||||||
name: "query"
|
|
||||||
type: "string"
|
|
||||||
description: "Query to retrieve embeddings"
|
|
||||||
required: true
|
|
||||||
role_reference:
|
|
||||||
name: "Role Reference"
|
|
||||||
type: "string"
|
|
||||||
description: "The role information needs to be retrieved for"
|
|
||||||
required: true
|
|
||||||
metadata:
|
|
||||||
author: "Josako"
|
|
||||||
date_added: "2025-07-07"
|
|
||||||
changes: "Initial version"
|
|
||||||
description: "Retrieves vacancy text for a specific role"
|
|
||||||
@@ -15,10 +15,4 @@ RETRIEVER_TYPES = {
|
|||||||
"partner": "traicie",
|
"partner": "traicie",
|
||||||
"valid_catalog_types": ["TRAICIE_ROLE_DEFINITION_CATALOG"]
|
"valid_catalog_types": ["TRAICIE_ROLE_DEFINITION_CATALOG"]
|
||||||
},
|
},
|
||||||
"TRAICIE_ROLE_DEFINITION_VACANCY_TEXT": {
|
|
||||||
"name": "Traicie Role Definition Vacancy Text Retriever",
|
|
||||||
"description": "Retrieves vacancy text for a given role",
|
|
||||||
"partner": "traicie",
|
|
||||||
"valid_catalog_types": ["TRAICIE_ROLE_DEFINITION_CATALOG"]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,6 +181,15 @@ def prepare_arguments(specialist: Any, arguments: Dict[str, Any]) -> Dict[str, A
|
|||||||
inherited_args['type'] = retriever.type
|
inherited_args['type'] = retriever.type
|
||||||
inherited_args['type_version'] = retriever.type_version
|
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 the combined arguments
|
||||||
validate_retriever_arguments(
|
validate_retriever_arguments(
|
||||||
retriever.type, retriever.type_version,
|
retriever.type, retriever.type_version,
|
||||||
|
|||||||
Reference in New Issue
Block a user