morphik-core/base_vector_store.py

16 lines
457 B
Python

from abc import ABC, abstractmethod
from typing import List
from document import DocumentChunk
class BaseVectorStore(ABC):
@abstractmethod
def store_embeddings(self, chunks: List[DocumentChunk]) -> bool:
"""Store document chunks and their embeddings"""
pass
@abstractmethod
def query_similar(self, query_embedding: List[float], k: int, owner_id: str) -> List[DocumentChunk]:
"""Find similar chunks"""
pass