repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | from abc import ABC, abstractmethod |
| #2 | from typing import List, Dict, Any |
| #3 | |
| #4 | class BaseReranker(ABC): |
| #5 | """Abstract base class for all rerankers.""" |
| #6 | |
| #7 | @abstractmethod |
| #8 | def rerank(self, query: str, documents: List[Dict[str, Any]], top_k: int = None) -> List[Dict[str, Any]]: |
| #9 | """ |
| #10 | Rerank documents based on relevance to the query. |
| #11 | |
| #12 | Args: |
| #13 | query: The search query |
| #14 | documents: List of documents to rerank, each with 'memory' field |
| #15 | top_k: Number of top documents to return (None = return all) |
| #16 | |
| #17 | Returns: |
| #18 | List of reranked documents with added 'rerank_score' field |
| #19 | """ |
| #20 | pass |