open-webui / backend /open_webui /retrieval /models /base_reranker.py
github-actions[bot]
GitHub deploy: 114f709337283743a81be86c3a39cf0feb28014a
bf4f454
Raw
History Blame Contribute Delete
219 Bytes
from abc import ABC, abstractmethod
from typing import Optional, List, Tuple
class BaseReranker(ABC):
@abstractmethod
def predict(self, sentences: List[Tuple[str, str]]) -> Optional[List[float]]:
pass