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

Method _web_search_check

scripts/fetch_updates.py:2820–2828  ·  view source on GitHub ↗

Dispatch web search to Vertex AI (preferred), fallback to Google CSE.

(self, source_id: str, source: dict)

Source from the content-addressed store, hash-verified

2818 json.dump(self.state, f, indent=2, ensure_ascii=False)
2819
2820 def _web_search_check(self, source_id: str, source: dict) -> Optional[dict]:
2821 """Dispatch web search to Vertex AI (preferred), fallback to Google CSE."""
2822 if self.vertex.available:
2823 result = self.vertex.check(source_id, source)
2824 if result:
2825 return result
2826 if self.google.available:
2827 return self.google.check(source_id, source)
2828 return None
2829
2830 def check_source(self, source_id: str, source: dict) -> Optional[dict]:
2831 check_type = source.get("check_type", "http_head")

Callers 1

check_sourceMethod · 0.95

Calls 1

checkMethod · 0.45

Tested by

no test coverage detected