- Introduction of retrievers - Ensuring processing information is collected from Catalog iso Tenant - Introduction of a generic Form class to enable dynamic fields based on a configuration - Realisation of Retriever functionality to support dynamic fields
40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
from pydantic import BaseModel, PrivateAttr
|
|
from typing import Dict, Any
|
|
|
|
from common.utils.model_utils import ModelVariables
|
|
|
|
|
|
class EveAIRetriever(BaseModel):
|
|
_catalog_id: int = PrivateAttr()
|
|
_user_metadata: Dict[str, Any] = PrivateAttr()
|
|
_system_metadata: Dict[str, Any] = PrivateAttr()
|
|
_configuration: Dict[str, Any] = PrivateAttr()
|
|
_tenant_info: Dict[str, Any] = PrivateAttr()
|
|
_model_variables: ModelVariables = PrivateAttr()
|
|
|
|
def __init__(self, catalog_id: int, user_metadata: Dict[str, Any], system_metadata: Dict[str, Any],
|
|
configuration: Dict[str, Any]):
|
|
super().__init__()
|
|
self._catalog_id = catalog_id
|
|
self._user_metadata = user_metadata
|
|
self._system_metadata = system_metadata
|
|
self._configuration = configuration
|
|
|
|
@property
|
|
def catalog_id(self):
|
|
return self._catalog_id
|
|
|
|
@property
|
|
def user_metadata(self):
|
|
return self._user_metadata
|
|
|
|
@property
|
|
def system_metadata(self):
|
|
return self._system_metadata
|
|
|
|
@property
|
|
def configuration(self):
|
|
return self._configuration
|
|
|
|
# Any common methods that should be shared among retrievers can go here.
|