|
from abc import ABC, abstractmethod |
|
|
|
|
|
class AStore(ABC): |
|
''' |
|
Classe abstraite de base pour tous les stores : |
|
Chroma |
|
Perso |
|
... |
|
''' |
|
|
|
@abstractmethod |
|
def reset(self)->None: |
|
pass |
|
|
|
@abstractmethod |
|
def print_infos(self)->None: |
|
pass |
|
|
|
@abstractmethod |
|
def add_to_collection(self, collection_name:str, source:str, vectors:list[list[float]], chunks:list[str])->None: |
|
pass |
|
|
|
@abstractmethod |
|
def delete_collection(self, name:str)->None: |
|
pass |
|
|
|
@abstractmethod |
|
def get_similar_vector(self, vector:list[float], collection_name:str)->list[float]: |
|
pass |
|
|
|
@abstractmethod |
|
def get_similar_chunk(self, query_vector:list[float], collection_name:str)->tuple[str, str]: |
|
pass |
|
|
|
@abstractmethod |
|
def get_similar_chunks(self, query_vector:list[float], count:int, collection_name:str): |
|
pass |
|
|