Spaces:
Build error
Build error
Download src/tools/base.py from DataQuests/DeepCritical: direct link, hf CLI and curl.
- Browser
- Download file 765 Bytes
-
https://huggingface.co/spaces/DataQuests/DeepCritical/resolve/3139749ea8dafb341fb50ee1a791cd7eeb49fdb9/src/tools/base.py
- Command line
-
hf download hf://spaces/DataQuests/DeepCritical@3139749ea8dafb341fb50ee1a791cd7eeb49fdb9/src/tools/base.py
-
curl -L -o base.py https://huggingface.co/spaces/DataQuests/DeepCritical/resolve/3139749ea8dafb341fb50ee1a791cd7eeb49fdb9/src/tools/base.py
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.""" | |
| 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 | |
| """ | |
| ... | |