Spaces:
Runtime error
Runtime error
File size: 497 Bytes
644f326 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | from abc import ABC, abstractmethod
from typing import List
class BaseEmbeddingService(ABC):
"""Abstract base class for all embedding service providers."""
@abstractmethod
def embed_documents(self, texts: List[str]) -> List[List[float]]:
"""Embed a list of text documents into vector representations."""
pass
@abstractmethod
def embed_query(self, text: str) -> List[float]:
"""Embed a single query text into a vector representation."""
pass
|