Update main.py
Browse files
main.py
CHANGED
|
@@ -9,11 +9,12 @@ app = FastAPI()
|
|
| 9 |
@app.post("/process_ocr_text_openai_trigger")
|
| 10 |
async def process_document_base64(request: Request,background_tasks: BackgroundTasks):
|
| 11 |
request_data = await request.json()
|
| 12 |
-
user_id = request_data.get('user_id')
|
| 13 |
-
message_id = request_data.get('message_id')
|
| 14 |
-
email = request_data.get('email')
|
| 15 |
-
raw_text = request_data.get('receipt_text')
|
|
|
|
| 16 |
# data = await process_synchronous_job(user_id,email,message_id,raw_text)
|
| 17 |
-
background_tasks.add_task(process_synchronous_job,
|
| 18 |
|
| 19 |
return {"message":"Processing the data!!"}
|
|
|
|
| 9 |
@app.post("/process_ocr_text_openai_trigger")
|
| 10 |
async def process_document_base64(request: Request,background_tasks: BackgroundTasks):
|
| 11 |
request_data = await request.json()
|
| 12 |
+
# user_id = request_data.get('user_id')
|
| 13 |
+
# message_id = request_data.get('message_id')
|
| 14 |
+
# email = request_data.get('email')
|
| 15 |
+
# raw_text = request_data.get('receipt_text')
|
| 16 |
+
|
| 17 |
# data = await process_synchronous_job(user_id,email,message_id,raw_text)
|
| 18 |
+
background_tasks.add_task(process_synchronous_job,request_data)
|
| 19 |
|
| 20 |
return {"message":"Processing the data!!"}
|