Skip to content

pancake0003/AskPancake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AskPancake

my 24/7 Q&A website

author: Joy Song

process & docs

development

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.

Screen Shot 2023-12-12 at 11 47 03 AM

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".

Screen Shot 2023-12-12 at 11 42 55 AM

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)

Screen Shot 2023-12-12 at 12 31 48 PM

(here's the ai trying to imitate me)(pretty successful)

the json file looks like this:

Screen Shot 2023-12-12 at 12 31 58 PM

front end

I started with changing the UI:

WechatIMG112300 Screen Shot 2023-12-12 at 4 17 05 PM

settling on a desirable UI, which randomly switches between emotes when given an answer:

Screen Shot 2023-12-12 at 4 34 03 PM

Some stressful and despairing debug process :')

image

image1

And finally, a desired outcome.

Screen Shot 2023-12-13 at 12 06 45 AM

debugging

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...

Screen Shot 2023-12-13 at 1 56 16 AM

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:

Screen Shot 2023-12-12 at 11 58 21 PM

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. :')

pwa

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:

Screen Shot 2023-12-14 at 7 19 49 AM Screen Shot 2023-12-14 at 7 19 33 AM

phone:

IMG_6693

IMG_6694

website

here's my final website AskPancake! Enjoy! update: the website is down for repair & updates!

About

my 24/7 Q&A website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors