Spaces:
Running
Running
| from abc import ABC, abstractmethod | |
| class EmbeddingProvider(ABC): | |
| """Abstract base — swap local pplx-embed or Azure without changing any other code.""" | |
| def embed_documents(self, texts: list[str]) -> list[list[float]]: | |
| """Embed a list of document strings.""" | |
| ... | |
| def embed_query(self, text: str) -> list[float]: | |
| """Embed a single query string.""" | |
| ... | |
| def dimension(self) -> int: | |
| """Output embedding dimension.""" | |
| ... | |