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

Method whoRetrieveInt

AskAgent/python/core/whoHandler.py:94–112  ·  view source on GitHub ↗
(self, query)

Source from the content-addressed store, hash-verified

92 return valid_queries
93
94 async def whoRetrieveInt(self, query):
95 # Check cache first
96 if query in _vector_db_cache:
97 logger.debug(f"Cache hit for query: {query}")
98 items = _vector_db_cache[query]
99 else:
100 logger.debug(f"Cache miss for query: {query}")
101 items = await search(
102 query,
103 site='nlweb_sites', # Use the sites collection
104 query_params=self.query_params,
105 num_results=20
106 )
107 # Store in cache
108 _vector_db_cache[query] = items
109
110 for item in items:
111 if (item not in self.final_retrieved_items):
112 self.final_retrieved_items.append(item)
113
114
115 async def runQuery(self):

Callers 1

runQueryMethod · 0.95

Calls 2

searchFunction · 0.90
debugMethod · 0.45

Tested by

no test coverage detected