I named this branch restart because I had planned to just add the restart route, but things went a little further than planned. I tried to limit changes as much as possible but discovered a catch-22. I could not make a prompt without tag generation but could not do tag generation until a prompt was made. (Previously we did not need the prompt to do this because we were only looking at the tags and not the actual text associated with the tag). This required a bit of a rework.
main.py
Added a "/restart" route
Updated "/user-choice" route to match front-end
Updated "/story" route to account for refactors and to separate first and subsequent generations
context
In order to make the "/user-choice" route work, I had to make major changes to context class.
Added reset function to reset only story details but not genre, user, etc.
Renamed tag/choice variables
choice_options is now a dict with choice text as key and tags as content
Moved tag generation from helper to context
Fixed tag iteration function to work with new variables
Created a function to iterate the beat (This is a combination of two other class functions. One sets the user's selection, the next generates the tags. This ensures that these steps are done in the proper order to avoid issues)
helpers
Minor rewrites to ensure it works with new class variable names.
Removed the tag generation functions
I think that's about all. I changed the README once but stopped updating it because I ended up needed to change things again each time I fixed it. Decided to wait until everything was finalized instead.
I named this branch restart because I had planned to just add the restart route, but things went a little further than planned. I tried to limit changes as much as possible but discovered a catch-22. I could not make a prompt without tag generation but could not do tag generation until a prompt was made. (Previously we did not need the prompt to do this because we were only looking at the tags and not the actual text associated with the tag). This required a bit of a rework.
main.py
context In order to make the "/user-choice" route work, I had to make major changes to context class.
helpers
I think that's about all. I changed the README once but stopped updating it because I ended up needed to change things again each time I fixed it. Decided to wait until everything was finalized instead.