Process multiple requests in FIFO using OpenAI Batch API and Supabase/Postgres
Call Files API
api.openai.com
Call Batch API
api.openai.com
Start (mock data)
If status = completed
Convert to batch requests in .jsonl
.jsonl to base64
noOp
Decode base64
Call Batch API to retrieve batch object
Download .jsonl result
Cron Job (5 mins)
Create a row in batch table
supabase
Get the earliest uncompleted batch
postgres
Update status
supabase
Update status and result
supabase
Submission done
noOp
Retrieval done
noOp
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.