Error while using streamlit with Real-time LLM App

I am getting this problem while using LLM app.

I have tried below instructions -

Looks like your app’s having a bit of trouble talking to the server. Let’s try a few things:

  1. First check if this error comes up every time or just sometimes.

  2. Before the line in, add print statements to output the url , data , and json variables. This helps confirm what you’re sending. Something like

print("URL:", url) print("Data:", data) print("JSON:", json) And then run your app again, and you should see the details in your console. 3, To pinpoint the issue, after you see the URL and data printed in your app, head to ReqBin (, paste the URL and data into the respective fields, and click ‘Run’ to simulate the request.

on following the above instructions, I got this output-

Data: {'query': 'show discount'}
JSON: <module 'json' from '/Users/deepshikhar/anaconda3/envs/discount_app/lib/python3.11/json/'>
2023-12-29 11:06:33.450 Uncaught app exception

and after pasting the URL and data in reqbin, I am getting this -

Anyone know how to solve this error