mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
feat(embedding): add EmbeddingProvider ABC
This commit is contained in:
parent
5ea4a10b1c
commit
66e1afbe6d
1 changed files with 13 additions and 0 deletions
13
paperforge/embedding/providers/base.py
Normal file
13
paperforge/embedding/providers/base.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
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]:
|
||||
...
|
||||
Loading…
Reference in a new issue