Let's see if GPT-4 can build ChatGPT in 10 prompts or less:
Note: I'm going to do this live, I have no idea if this is going to work. Wish me luck 🫡
PROMPT 1:

We're asking it to build a React component for a chatbot: Image
Here's the response, it looks pretty good! ImageImage
PROMPT 2:

Now we'll ask it to write the HTML file that includes the React component, and style it. I asked it for dark mode–let's see how it does 😅 Image
Here's the response: ImageImage
As you can see, it's asking me to include an index.js file...but it hasn't yet told me what that is. Let's use a prompt on that!
Here's its response: ImageImage
It's recommending I use the create-react-app to start the project, which makes me a bit nervous but we'll give it a shot! Image
I'm creating the React app now: Image
AND WE HAVE A CHATBOT!

It's client-side only for now, but you can send messages and everything :) Image
PROMPT 3:

Okay now we're cooking! We need a Flask server to handle the chat requests from the client. When it gets a chat request it should send it to GPT-4 for a completion. I'm literally going to paste in the GPT-4 API docs for reference.

Let's see what it can do! Image
Here's the response. Looks good!

I'm going to implement this (with a few minor modifications) and see what happens... Image
Our server is up and running!!! Image
Okay, we ran into a minor problem. Our server and client are hosted at different addresses—so when I make POST requests I get a Cross Origin error: Image
PROMPT 4:

Let's ask GPT-4 to fix the CORS error! Image
Here's the response. Seems reasonable! I'll report back... Image
Okay I went back and forth a bit on the CORS issue until it finally found the right modification for my app.py file. Not counting that as a prompt...it's sort of a side quest conversation. But...it fixed it!
Now, when I type a message it hits my chat server! Image
But there's a problem...when I send the request to GPT-4 it returns an error.

It looks like for some reason we're not actually sending the chat transcript to GPT-4. Not sure why...I'm going to step through the code Image
Okay so it looks like for some reason the client side isn't actually sending the chat transcript to the server.

I wonder why that is... Image
OMFG IT WORKS Image
For some reason it works on the second message, but not the first.

Going to have to ask GPT-4 why that is, and see if it can fix it...
PROMPT 5:

I asked it why the first message doesn't arrive and it figured it out! Image
It worked! It worked! It worked! Image
This was shockingly, crazily, incredibly easy. Image
I actually also learned something...I never would've used the create-react stuff on my own. I would've rolled it myself.

But it's quite good! Image
Now...let's see if I can get my ChatGPT clone to create another ChatGPT clone in 10 prompts or less... 👿 Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dan Shipper 📧

Dan Shipper 📧 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @danshipper

Mar 17
How to use GPT-4 to create incredible writing:
AI-assisted writing gets a bad rap. People think it's bland and only able to churn out generic SEO-farm content.

But with the release of GPT-4 you can actually use AI as a serious creative partner.

Here's how:
GPT-4 can help you:

1. Organize your thoughts
2. Capture a particular style or voice
3. Summarize complex ideas
4. Evaluate your writing when you need a second opinion

Let's walk through these one by one.
Read 10 tweets
Jan 31
How to turn any book into a chatbot using GPT-3:
GPT-3 makes it easy to turn any piece of text into a chatbot. It's an incredible technology.

Here's one I made out of the Huberman Lab podcast transcripts:
The only problem with GPT-3 is that it has context window limitations: you can only feed a limited amount of text into it at a time.

So how do we get it to answer questions across an entire book?
Read 20 tweets
Jan 29
So…..I built an AI chatbot that interprets and visualizes dreams.

It uses GPT-3 and DALL-E…and the results are pretty awesome: ImageImageImage
Here’s some more spooky imagery from dreams I’ve sent it: ImageImageImageImage
I have no idea about the epistemic status of dream interpretations (both AI and human generated), but they seem interesting to pay attention to

I’ve kept a dream journal in my Apple Notes for a few years now
Read 8 tweets
Jan 19
I loaded journal entries from the past 10 years into GPT-3 and then started asking it questions:

- What do I need to learn?
- What do I not realize about myself?
- What's obvious to everyone around me, but not to me?
- What are my deepest hopes?

The results are...pretty wild.
It's very good at synthesizing and summarizing things you've written in the past, so you can see patterns.

Sometimes it repeats itself, or says things that are overly nice and rose-y...but sometimes it's really insightful.
I asked it how an old relationship would've ended if it did end (the answer isn't contained in the corpus) and it got it mostly right.

It correctly identified the patterns that ended up pulling us apart.
Read 9 tweets
Jan 17
Journaling with GPT-3 is like journaling on steroids.

Here's how:
Journaling is already an effective personal development practice. It helps you:

• Get thoughts out of your head
• Show you patterns in your thinking
• Record your journey through life
• Guide your focus intentionally

But it also has problems...
Problems with journaling:

• It's hard to sit down and do it
• It's difficult to stare at a blank page
• It sometimes feels silly
• You don't go back and look at old entries
• Journal prompts like "3 things I am grateful for" get stale
Read 13 tweets
Jan 9
How GPT-3 will turn all of your notes into an *actual* second brain:
1. Notes will be automatically tagged and linked, no manual work required.

2. Notes will be automatically enriched and synthesized to help you find patterns.

3. CoPilot-like functionality will resurface key information from previous notes in-context as you type.
Let's talk about these one by one:
Read 13 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(