MCPcopy Index your code
hub / github.com/geekcomputers/Python / query

Method query

ThirdAI/Terms and Conditions/ThirdAI.py:24–36  ·  view source on GitHub ↗
(self, question)

Source from the content-addressed store, hash-verified

22 self.db.insert(insertable_docs, train=True)
23
24 def query(self, question):
25 # Searching of required query in neural database
26 search_results = self.db.search(
27 query=question,
28 top_k=2,
29 on_error=lambda error_msg: print(f"Error! {error_msg}"),
30 )
31
32 output = ""
33 for result in search_results:
34 output += result.text + "\n\n"
35
36 return output

Callers 2

forwardMethod · 0.80
processingMethod · 0.80

Calls 1

searchMethod · 0.45

Tested by

no test coverage detected