- Revisiting RAG_SPECIALIST
- Adapt Catalogs & Retrievers to use specific types, removing tagging_fields - Adding CrewAI Implementation Guide
This commit is contained in:
20
common/utils/cache/config_cache.py
vendored
20
common/utils/cache/config_cache.py
vendored
@@ -332,24 +332,22 @@ class BaseConfigTypesCacheHandler(CacheHandler[Dict[str, Any]]):
|
||||
"""
|
||||
return isinstance(value, dict) # Cache all dictionaries
|
||||
|
||||
def _load_type_definitions(self) -> Dict[str, Dict[str, str]]:
|
||||
def _load_type_definitions(self) -> Dict[str, Dict[str, Any]]:
|
||||
"""Load type definitions from the corresponding type_defs module"""
|
||||
if not self._types_module:
|
||||
raise ValueError("_types_module must be set by subclass")
|
||||
|
||||
type_definitions = {
|
||||
type_id: {
|
||||
'name': info['name'],
|
||||
'description': info['description'],
|
||||
'partner': info.get('partner') # Include partner info if available
|
||||
}
|
||||
for type_id, info in self._types_module.items()
|
||||
}
|
||||
type_definitions = {}
|
||||
for type_id, info in self._types_module.items():
|
||||
# Kopieer alle velden uit de type definitie
|
||||
type_definitions[type_id] = {}
|
||||
for key, value in info.items():
|
||||
type_definitions[type_id][key] = value
|
||||
|
||||
return type_definitions
|
||||
|
||||
def get_types(self) -> Dict[str, Dict[str, str]]:
|
||||
"""Get dictionary of available types with name and description"""
|
||||
def get_types(self) -> Dict[str, Dict[str, Any]]:
|
||||
"""Get dictionary of available types with all defined properties"""
|
||||
result = self.get(
|
||||
lambda type_name: self._load_type_definitions(),
|
||||
type_name=f'{self.config_type}_types',
|
||||
|
||||
Reference in New Issue
Block a user