my 24/7 Q&A website
author: Joy Song
I wanted to create a website that would be my Q&A site 24/7. The inspiration comes from profg.ai. I think that this is an interesting way of communication (through a type of miscommunication and misinterpretation).
I started off with building a simple ui and a base model that would return "Sure! Let me help you with" and whatever the user input was.
After integrating Openai methods and API, i started with having the ai return answers with a simple command: "You are a cat, reply with cat language".
This indicated that I have successfully made openai respond to my server's user prompts!
after that, I decided to insert a txt file that i've written before hand to train the ai to behave like me. Training the ai took 4 days and it was a tedious process trying to encode many features (though i eventually abandoned most)
(here's the ai trying to imitate me)(pretty successful)
the json file looks like this:
I started with changing the UI:
settling on a desirable UI, which randomly switches between emotes when given an answer:
Some stressful and despairing debug process :')
And finally, a desired outcome.
After finishing most of the back-end stuff, and successfully uploading everything to Digital Ocean and hosting it on a public server, I decided it's time to "playtest" the site, so I invited 6 friends to try out the website and see. Eventually they overachieved and completely broke the website! XD the whole process of debugging took me more than 10 hours...
Initially, I was trying to fix the instructions txt file so that the ai wouldn't keep giving in to my friends and start telling them that it's an ai assistant. After fixing the txt file, I decided to upgrade the model to gpt 4, and it turned out to be a great choice, since gpt 4 is a lot smarter and cuter. However, after all of this, the website eventually wouldn't reply with anything other than Internal Server Error. I checked pm2 logs and saw this:
After spending another half day decrypting everything and understanding rate limits, I thought i was not paying enough so i increased the quota, however the server broke again in just a few minutes. I debugged for another 4 hours and eventually found out that it was because my instructions txt file was too long (yes it was 4 pages). Each time the ai tries to reply to a message, it reads from the txt file and this process would use a lot of tokens, eventually causing it to not be able to send any messages. I quickly updated the txt file and made it extremely short. For safety purpose I also downgraded gpt 4 back to 3.5.
The drawback of this is that the ai no longer knows my hobbies and stories, and is significantly less intelligent, but there's no work-around currently se we'll have to bear with it. :')
After finishing all this, I moved on to making this website a pwa. It was all fun and games until i tried to implement my suceessful localhost trial to my online server. Somehow it just wouldn't show the pwa option. There is no error logs whatsoever, and I debugged for another day on the issue, but eventually just failed to find a reason. :((( My Laptop localhost and phone works just fine, as shown:
laptop:
phone:
here's my final website AskPancake! Enjoy! update: the website is down for repair & updates!




