File size: 775 Bytes
7a98bd3 f51bb92 7a98bd3 f51bb92 7a98bd3 f51bb92 7a98bd3 f51bb92 7a98bd3 f51bb92 8f6647c f51bb92 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# template for vector store classes
class VectorStoreBase:
def __init__(self, config):
self.config = config
def _init_vector_db(self):
"""
Creates a vector store object
"""
raise NotImplementedError
def create_database(self):
"""
Populates the vector store with documents
"""
raise NotImplementedError
def load_database(self):
"""
Loads the vector store from disk
"""
raise NotImplementedError
def as_retriever(self):
"""
Returns the vector store as a retriever
"""
raise NotImplementedError
def __len__(self):
raise NotImplementedError
def __str__(self):
return self.__class__.__name__
|