Get Trace
Get the response of a trace.
1 from reasoner import Reasoner 2 3 r = Reasoner(api_key=”foobar”) 4 5 ... # start a non-blocking trace and record the response_uid 6 7 answer = None 8 while True: 9 response = r.traces.get(response_uid) 10 if response['status'] == 'success': 11 answer = response["response"] 12 break 13 else: 14 # decide whether to show partial answer 15 # or sleep before checking status again 16 continue