- Tuning moved to Retriever iso in the configuration, as this is an attribute that should be available for all types of Retrievers
41 lines
1.2 KiB
Python
41 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()
|
|
_tuning: bool = 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.
|