File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def show_on_call_search(event: ExecutionBaseEvent, params: SearchParams):
3535 answers = []
3636 try :
3737 if params .search_term in lru_cache :
38- answers = [ lru_cache [params .search_term ]] # Wrap the cached result in a list
38+ answers . append ( lru_cache [params .search_term ])
3939 else :
4040 start_time = time .time ()
4141 url_with_param = f"{ params .on_call_enricher_url } ?{ urllib .parse .urlencode ({'search_term' : params .search_term })} "
@@ -46,7 +46,7 @@ def show_on_call_search(event: ExecutionBaseEvent, params: SearchParams):
4646 response_json = response .json ()
4747 time_taken = time .time () - start_time
4848 logging .info (f"Response from on-call enricher: { response_json } " )
49- result = response_json .get ('data' , {}).get ('results ' , '' )
49+ result = response_json .get ('data' , {}).get ('result ' , '' )
5050 lru_cache [params .search_term ] = result # Store the response in the cache
5151 answers .append (result )
5252 answers .append (f"\n \n ---" )
You can’t perform that action at this time.
0 commit comments