File size: 424 Bytes
fee0ada
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# BaseDB.py

from abc import ABC, abstractmethod

class BaseDB(ABC):

    @abstractmethod
    def init_db(self):
        pass
    
    @abstractmethod
    def save(self, file_path):
        pass

    @abstractmethod
    def load(self, file_path):
        pass

    @abstractmethod
    def search(self, vector, n_results):
        pass

    @abstractmethod
    def init_from_docs(self, vectors, documents):
        pass