Made something similar recently, but for WhatsApp: https://chatbling.net/ What behaviour would users prefer when uploading a voice message, a) the voice message is transcribed, so speech to text? Or b) the voice message is treated as a query, so you receive a text answer to your voice query? I've done a) for now as mobile devices already let you type with your voice.
Going forward, I'll explore storing image jobs in redis or something, which will be more resilient to server crashes.
As for conversation history, I'll continue to keep that in memory for now (messages are evicted after a short time period, or if messages consume too many OpenAI tokens) - even that's lost during a server restart/crash. Feels like quite a big decision to store sensitive chat history in a persistent database, from a privacy standpoint.