Spaces:
Runtime error
Runtime error
Download src/service/embedding/base.py from VashuTheGreat2/Multi-Rag: direct link, hf CLI and curl.
- Browser
- Download file 497 Bytes
-
https://huggingface.co/spaces/VashuTheGreat2/Multi-Rag/resolve/main/src/service/embedding/base.py
- Command line
-
hf download hf://spaces/VashuTheGreat2/Multi-Rag/src/service/embedding/base.py
-
curl -L -o base.py https://huggingface.co/spaces/VashuTheGreat2/Multi-Rag/resolve/main/src/service/embedding/base.py
497 Bytes
| from abc import ABC, abstractmethod | |
| from typing import List | |
| class BaseEmbeddingService(ABC): | |
| """Abstract base class for all embedding service providers.""" | |
| def embed_documents(self, texts: List[str]) -> List[List[float]]: | |
| """Embed a list of text documents into vector representations.""" | |
| pass | |
| def embed_query(self, text: str) -> List[float]: | |
| """Embed a single query text into a vector representation.""" | |
| pass | |