MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / run

Method run

bmtools/tools/google_serper/api.py:33–44  ·  view source on GitHub ↗

Run query through GoogleSearch and parse result.

(self, query: str, **kwargs: Any)

Source from the content-addressed store, hash-verified

31 )
32
33 def run(self, query: str, **kwargs: Any) -> str:
34 """Run query through GoogleSearch and parse result."""
35 results = self._google_serper_search_results(
36 query,
37 gl=self.gl,
38 hl=self.hl,
39 num=self.k,
40 tbs=self.tbs,
41 search_type=self.type,
42 **kwargs,
43 )
44 return self._parse_results(results)
45
46 def _parse_snippets(self, results: dict) -> List[str]:
47 snippets = []

Callers 1

search_generalFunction · 0.45

Calls 2

_parse_resultsMethod · 0.95

Tested by

no test coverage detected