Spaces:
Running
Running
File size: 431 Bytes
b917edb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from abc import ABC, abstractmethod
from typing import List
import numpy as np
class EmbeddingProvider(ABC):
"""
Abstract class for the llm providers
"""
@abstractmethod
def embed_documents(self, documents: List[str]) -> np.ndarray:
"""Embed a list of documents"""
pass
@abstractmethod
def embed_query(self, query: str) -> np.ndarray:
"""Embed a query"""
pass
|