Spaces:
Running
Running
File size: 539 Bytes
e25b548 31df32c e25b548 31df32c e25b548 31df32c e25b548 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from abc import ABC, abstractmethod
from typing import Any, Dict, Optional
class BaseSearcher(ABC):
"""
Abstract base class for searching and retrieving data.
"""
@abstractmethod
def search(self, query: str, **kwargs) -> Optional[Dict[str, Any]]:
"""
Search for data based on the given query.
:param query: The searcher query.
:param kwargs: Additional keyword arguments for the searcher.
:return: Dictionary containing the searcher result, or None if not found.
"""
|