Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Saturn99X_Etherion /src /services /web_search_service.py
| """ | |
| Web Search Service (Grounded Search integration) | |
| Provides a unified abstraction for mandatory web search using Exa Search. | |
| Refs: | |
| - Vertex AI Search/Discovery Engine SearchServiceClient | |
| - Grounding with Google Search (enable in datastore; set request fields) | |
| """ | |
| from __future__ import annotations | |
| import os | |
| from typing import Any, Dict, List | |
| from src.tools.exa_search import exa_search | |
| class WebSearchService: | |
| async def search(self, query: str, num_results: int = 20, job_id: str | None = None) -> List[Dict[str, Any]]: | |
| params = { | |
| "query": query, | |
| "search_type": "neural", | |
| "num_results": num_results, | |
| "include_text": True, | |
| "include_highlights": True, | |
| "include_summary": True, | |
| "job_id": job_id, | |
| } | |
| data = await exa_search(params) | |
| return data.get("results", []) | |
Xet Storage Details
- Size:
- 891 Bytes
- Xet hash:
- 83837e755bbecae33a4e9f2f337d6724927fffe5bdd950118ed94b5cb09dc955
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.