About a month ago, I watched a YouTube video about chatbots using machine learning to help people with mental health struggles. As someone who has struggled with mental health since high school and a student pursuing a career in machine learning, this caught my interest. I wanted to explore other possibilities of chatbots, and have been moved by the recent Black Lives Matter movement. Therefore, I began developing JustBot at this hackathon.

What it does

JustBot is a chatbot that answers users' questions regarding social justice. In addition, JustBot will also to refuse to answer questions that do not relate to the topic of social justice in order to avoid unethical misuse of it.

How I built it

I developed JustBot with the help of OpenAI's API and GPT-3 model. The user interface was developed with R and the chatbot itself is deployed in a Shiny web application. This allowed me to take user input and send it as a prompt to the API. I then requested the proper output from the API and displayed this in the web application. The requests to the API were done in Python, and I was able to define a function in Python that could be used in the Shiny web application alongside the UI I programmed in R thanks to the reticulate package in R.

Challenges I ran into

Due to a family emergency, I wasn't able to start working on this project until late Saturday night, and so I was short on time. In addition, I ran into difficulties in deployment since running the openai library was more difficult to do when publishing the web app than when running the application locally.

Accomplishments that I am proud of

I am proud to have been able to have picked up a new skill: using APIs in such a short amount of time and for even being able to have produced some kind of product. Usually, starting a project and coming up with an idea is the most difficult part for me, but I was able to push myself to not worry so much about already knowing everything I need to know to make the product perfect and just figure it out as I go.

What I learned

As TreeHacks was my first hackathon, I learned just how much I could learn and do in the span of a day if I really pushed myself to do so. I mentioned above that I learned how to use APIs, but I also learned just how amazing this community is. My fellow hackers at TreeHacks have definitely inspired me to continue to develop ideas and solutions that will one day make a large impact on the world.

What's next for JustBot

JustBot's responses are not perfect, and I still need to figure out the best parameters to use for the davinci engine in the GPT-3 model. Additionally, I would like to improve the user interface of the web application, as it is quite plain right now and does not really look like a chat.

Built With

Share this project: