srinuksv commited on
Commit
77832fe
1 Parent(s): cca1e16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -213,13 +213,13 @@ async def receive_form_data(request: Request):
213
  }
214
  a=sf.Lead.create(data)
215
  # Generate a unique ID (for tracking user)
216
- unique_id = str(uuid.uuid4())
217
 
218
  # Here you can do something with form_data like saving it to a database
219
  print("Received form data:", form_data)
220
 
221
  # Send back the unique id to the frontend
222
- return JSONResponse({"id": a['id']})
223
 
224
  @app.post("/chat/")
225
  async def chat(request: MessageRequest):
 
213
  }
214
  a=sf.Lead.create(data)
215
  # Generate a unique ID (for tracking user)
216
+ unique_id = a['id']
217
 
218
  # Here you can do something with form_data like saving it to a database
219
  print("Received form data:", form_data)
220
 
221
  # Send back the unique id to the frontend
222
+ return JSONResponse({"id": unique_id})
223
 
224
  @app.post("/chat/")
225
  async def chat(request: MessageRequest):