MCPcopy Create free account
hub / github.com/nlweb-ai/NLWeb / run_query_set

Method run_query_set

AskAgent/python/testing/test_queries_and_rss.py:121–140  ·  view source on GitHub ↗

Run a set of queries and return all results Args: queries: List of dicts with 'query' and optional 'site', 'num_results'

(self, queries: list[dict[str, Any]])

Source from the content-addressed store, hash-verified

119 }
120
121 async def run_query_set(self, queries: list[dict[str, Any]]) -> list[dict[str, Any]]:
122 """
123 Run a set of queries and return all results
124
125 Args:
126 queries: List of dicts with 'query' and optional 'site', 'num_results'
127 """
128 results = []
129 for q in queries:
130 query = q.get('query')
131 site = q.get('site', 'all')
132 num_results = q.get('num_results', 50)
133
134 result = await self.run_query(query, site, num_results)
135 results.append(result)
136
137 # Small delay between queries
138 await asyncio.sleep(0.5)
139
140 return results
141
142 def print_summary(self, results: list[dict[str, Any]]):
143 """Print overall summary of all queries"""

Callers 1

mainFunction · 0.95

Calls 2

run_queryMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected