(self)
| 327 | GOOGLE_CSE_URL = "https://www.googleapis.com/customsearch/v1" |
| 328 | |
| 329 | def __init__(self): |
| 330 | self.use_vertex = bool( |
| 331 | VERTEX_AI_PROJECT_ID and VERTEX_AI_SEARCH_APP_ID |
| 332 | and VERTEX_AI_SEARCH_API_KEY |
| 333 | ) |
| 334 | self.use_google = bool(GOOGLE_SEARCH_API_KEY and GOOGLE_SEARCH_ENGINE_ID) |
| 335 | if self.use_vertex: |
| 336 | logger.info("Using Vertex AI Search (searchLite)") |
| 337 | elif self.use_google: |
| 338 | logger.info("Using Google CSE (legacy)") |
| 339 | else: |
| 340 | logger.warning( |
| 341 | "No search API configured. Set VERTEX_AI_* or GOOGLE_SEARCH_* env vars." |
| 342 | ) |
| 343 | |
| 344 | @property |
| 345 | def available(self) -> bool: |
nothing calls this directly
no outgoing calls
no test coverage detected