Inspiration
About half a month ago I thought about joining some hackathons this year. Upon research, I found this hack united hackathon. At first I had no idea what to do with "mental health", so I just passively thought about it for some time. Then I finally brought everything I love together (AI, stoic quotes, deep analysis, etc...) together to finally come up with this app. My brother helped me finding this idea.
What it does
Anyone who desires is free to write about anything/any situation in his life he wants. Then the app takes this input and with AI analyses the situation, gives the user tips on how to improve his situation and as an extra shows some stoic quotes fit to the user. The user can then think about this and hopefully take his advise to better the situation.
How I built it
I'm gonna list all the technologies used: OpenAI GPT API, JavaScript, HTML, CSS, Node.JS, Warp (AI powered Mac terminal), VsCode, GitHub and EJS (first time using this).
Challenges I ran into
The AI often returned trash. Sometimes even unrelated things. Not to mention the formatting; At first I only used one single prompt for all three sections the user can see, but this is not really usable since I want to beautifully split the sections with HTML and CSS. Then I wanted the AI itself to format between very section, but this didn't work either since the AI is unreliable and from request to request formats differently (I had no time or knowledge to fine tune the model to be honest). Then I switched to three separate API calls for each section. While this easily fixed all issues, it now made the app very slow (10-30sec per request). I tried to make them async. However, I doubt that helped in any way (or I did it incorrectly). But don't worry if you use your of OpenAI Key. I only used 0.30$ worth of API during development. My estimate is that one app use is maybe 0.0005$ at most.
Accomplishments that I'm proud of
Personally, I'm really proud that the AI is quite reliable at detecting wether there's physical danger for anyone (self harm or harming someone else). But to make it less aggressive, I had to make it detect danger less often (I think it's better to falsely not flag something as a danger than to flag things too often as a danger. Improves the usability).
What I learned
I further advanced my knowledge of how to use the OpenAI GPT API.
What's next for Reflectory
This is the end for Reflectory for now. Though I do plan to develop it further and possibly release a public version once.
Log in or sign up for Devpost to join the conversation.