Spaces:
Running
Running
from abc import ABC, abstractmethod | |
from typing import List, Dict | |
class BaseRetriever(ABC): | |
"""检索策略的基类""" | |
def retrieve(self, query: str, context: List[Dict]) -> List[Dict]: | |
"""执行检索""" | |
pass | |
def init_retriever(self, config: Dict): | |
"""初始化检索器""" | |
pass |