mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 17:00:23 +00:00
13 lines
285 B
Python
13 lines
285 B
Python
from __future__ import annotations
|
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
class EmbeddingProvider(ABC):
|
|
@abstractmethod
|
|
def encode(self, texts: list[str]) -> list[list[float]]:
|
|
...
|
|
|
|
@abstractmethod
|
|
def encode_single(self, text: str) -> list[float]:
|
|
...
|