Start a Recall Trace
Start a recall trace against a source.
1 from reasoner import Reasoner 2 3 r = Reasoner(api_key=”foobar”) 4 5 ... # Add files and urls, build index 6 7 # Recall query on the index (blocking call) 8 response = r.recall('this is the question', index.uid, source.uid, wait=True) 9 10 # Recall query on the index (non-blocking call) 11 response_uid = r.recall('this is the question', index.uid, source.uid) 12 13 answer = None 14 while True: 15 response = r.traces.get(response_uid) 16 if response['status'] == 'success': 17 answer = response.response 18 break 19 else: 20 # decide whether to show partial answer 21 continue