haiku.rag/src/haiku/rag/embeddings/base.py
Yiorgis Gozadinos 0f8124fd98
Simply embedders
2025-07-17 13:17:47 +03:00

15 lines
465 B
Python

from haiku.rag.config import Config
class EmbedderBase:
_model: str = Config.EMBEDDINGS_MODEL
_vector_dim: int = Config.EMBEDDINGS_VECTOR_DIM
def __init__(self, model: str, vector_dim: int):
self._model = model
self._vector_dim = vector_dim
async def embed(self, text: str) -> list[float]:
raise NotImplementedError(
"Embedder is an abstract class. Please implement the embed method in a subclass."
)