AceZz / bedtime-writer

Dreamy Tales is a Generative AI application to create bedtime stories for children. Developed by @AceZz and @Piwakk.
3 stars 0 forks source link

Rethink how prompts are stored in Firestore #339

Open Piwakk opened 1 year ago

Piwakk commented 1 year ago

Originally, we created a separate prompts subcollection for IP reasons (minimize the risks that these leak). However, since we now have the separation landing / serving, that landing is never public (and will likely never be), and we can control very precisely which data end up in serving, we could put the prompts as attributes of the parts subcollection.

Note: could this be done for images as well?

For both prompts and images, doing this refactoring would give a code easier to read and fewer costs (since we only retrieve one document).