"""Interface to access to place that stores documents."""fromabcimportABC,abstractmethodfromtypingimportDict,List,Unionfromlangchain_core.documentsimportDocument
[docs]classDocstore(ABC):"""Interface to access to place that stores documents."""
[docs]@abstractmethoddefsearch(self,search:str)->Union[str,Document]:"""Search for document. If page exists, return the page summary, and a Document object. If page does not exist, return similar entries. """
[docs]defdelete(self,ids:List)->None:"""Deleting IDs from in memory dictionary."""raiseNotImplementedError
[docs]classAddableMixin(ABC):"""Mixin class that supports adding texts."""
[docs]@abstractmethoddefadd(self,texts:Dict[str,Document])->None:"""Add more documents."""