MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / __init__

Method __init__

scripts/fetch_nmpa_fulltext.py:329–342  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected