MCPcopy
hub / github.com/llmware-ai/llmware / text_query

Method text_query

llmware/retrieval.py:421–439  ·  view source on GitHub ↗

Execute a basic text query.

(self, query, exact_mode=False, result_count=20, exhaust_full_cursor=False, results_only=True)

Source from the content-addressed store, hash-verified

419 return output_result
420
421 def text_query (self, query, exact_mode=False, result_count=20, exhaust_full_cursor=False, results_only=True):
422
423 """ Execute a basic text query. """
424
425 # prepare query if exact match required
426 if exact_mode:
427 query = self.exact_query_prep(query)
428
429 # query the text collection
430 cursor = CollectionRetrieval(self.library_name,account_name=self.account_name).basic_query(query)
431
432 # package results, with correct sample counts and output keys requested
433 results_dict = self._cursor_to_qr(query, cursor,result_count=result_count,exhaust_full_cursor=
434 exhaust_full_cursor)
435
436 if results_only:
437 return results_dict["results"]
438
439 return results_dict
440
441 def text_query_with_document_filter(self, query, doc_filter, result_count=20, exhaust_full_cursor=False,
442 results_only=True, exact_mode=False):

Callers 15

summarize_fileFunction · 0.95
query_state_and_exportFunction · 0.95
queryMethod · 0.95
dual_pass_queryMethod · 0.95
augment_qrMethod · 0.95
document_filterMethod · 0.95
multistep_analysisFunction · 0.80
multistep_analysisFunction · 0.80

Calls 4

exact_query_prepMethod · 0.95
_cursor_to_qrMethod · 0.95
CollectionRetrievalClass · 0.90
basic_queryMethod · 0.45

Tested by 3