diff --git a/paperforge/embedding/providers/base.py b/paperforge/embedding/providers/base.py new file mode 100644 index 00000000..49ef2cf1 --- /dev/null +++ b/paperforge/embedding/providers/base.py @@ -0,0 +1,13 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod + + +class EmbeddingProvider(ABC): + @abstractmethod + def encode(self, texts: list[str]) -> list[list[float]]: + ... + + @abstractmethod + def encode_single(self, text: str) -> list[float]: + ...