VibecoderMcSwaggins's picture
feat(phase2): implement search slice (PubMed, Web, Orchestrator) (#4)
499170b
raw
history blame
765 Bytes
"""Base classes and protocols for search tools."""
from typing import Protocol
from src.utils.models import Evidence
class SearchTool(Protocol):
"""Protocol defining the interface for all search tools."""
@property
def name(self) -> str:
"""Human-readable name of this tool."""
...
async def search(self, query: str, max_results: int = 10) -> list[Evidence]:
"""
Execute a search and return evidence.
Args:
query: The search query string
max_results: Maximum number of results to return
Returns:
List of Evidence objects
Raises:
SearchError: If the search fails
RateLimitError: If we hit rate limits
"""
...