Simulate web search.
(self, query: str, num_results: int)
| 19 | results: List[Dict[str, str]] |
| 20 | |
| 21 | def _execute(self, query: str, num_results: int) -> Dict: |
| 22 | """Simulate web search.""" |
| 23 | time.sleep(0.8) # pretend latency |
| 24 | return { |
| 25 | "results": [ |
| 26 | { |
| 27 | "title": f"Result {i + 1} for {query}", |
| 28 | "url": f"https://example.com/result{i + 1}", |
| 29 | "snippet": f"This is a search result about {query}.", |
| 30 | } |
| 31 | for i in range(num_results) |
| 32 | ] |
| 33 | } |
nothing calls this directly
no outgoing calls
no test coverage detected