The response has a “predictions” key. I fixed the problem by removing all the codes in the get_rest_request function. I’m still confused why it doesn’t work if  I write it in function

image629×751 87.8 KB