Files
kotaemon/knowledgehub/indices/rankings/base.py
2023-11-27 14:25:54 +07:00

14 lines
352 B
Python

from __future__ import annotations
from abc import abstractmethod
from ...base import BaseComponent, Document
class BaseReranking(BaseComponent):
@abstractmethod
def run(self, documents: list[Document], query: str) -> list[Document]:
"""Main method to transform list of documents
(re-ranking, filtering, etc)"""
...