From Zero to Functioning Chatbot: How I Built a Chatbot with chatGPT as My Guide

A lot has been said about how chatGPT can be leveraged to write code or act as a guide/assistant. Intrigued, I decided to put it to the test. The results were nothing short of amazing. Read on to discover how I, a complete coding newbie, managed to build a functional chatbot with the help of chatGPT.

I am not a technical person

Before we start, you need to understand a bit about my background. I am not a technical person and I have very limited (or zero) coding knowledge.

I don’t know:

  • How to use the terminal on Mac machine
  • How to write CSS, HTML, Javascript, Python or any other programming languages
  • How to write code in text editor and then save the file to python or other formats.
  • I never created OpenAI API before this exercise
  • Of course, I never installed any software for programming purpose before
  • I have zero knowledge about App Engine, Cloud SDK or the like.

But I am relatively good at following instructions 🙂

So with that, this is what I asked chatGPT 4:

“Hi there, I am the owner of this website https://www.chandlernguyen.com/. I want to build a chatbot, leveraging OpenAI chatGPT API for my website. I am not a technical person though. So I need your help to guide me step by step. I want other people to be able to use the chatbot too. tell me how I should start”

chatGPT gave me an overall view of the process

After my initial prompt, chatGPT replied back with the overall process below:

chandlernguyen chatbot overall step guide by chatGPT

chatGPT automatically breaks down each step even further to suit a newbie like myself

I told chatGPT that I completed step 1 and got the OpenAI API ready. Then it replied with a further breakdown of step 2. The fact that it remembers that I am a newbie and need detailed guidance amazes me.

It doesn’t try to share too much though, only from step 2 to step 4 because too much information at one go will overwhelm me. Again, the fact that it knows how to do this automatically is great!

step 2 to step 4 guide by chatGPT for chandlernguyen chatbot

I am not hesitant to ask MANY MANY stupid questions to chatGPT

Something about interacting with a chatbot, without any fear of judgment, is so liberating!

I feel free to ask so many stupid questions, again, again and again. And mind you I asked many basic questions like:

  • How do I install python?
  • I complete step 1, installing python on my Mac. What is the next step before I can open the command prompt?
  • I receive this error: -bash: pip: command not found
  • I dont know how to navigate to the folder where I keep the files, using “Terminal” on Mac. (Answer: use cd command :D, but I don’t know that).
  • I dont know what “curl” means so I asked chatGPT to explain to me what it does.

When it came to deployment of the chatbot on the internet, I asked chatGPT to give me options and help me to evaluate them

chatGPT gave me the basic code that I can use for my chatbot in python and I copied and pasted the exact code into a text editor. I got the code to work on my local machine so it was time to deploy the application on the internet. Of course, I have no idea how to do this step so I asked chatGPT to give me different options, based on security concerns, ease of use, etc…

After some initial discussion, I decided to go with the Google Cloud Platform. The fact that they offer $300 + $100 free credit doesn’t hurt because well, I like free stuff.

chatGPT guides me to:

  • Install Cloud SDK
  • Connect my local machine to the Cloud Project
  • Build my application with Docker and then pushed it to the Artifact registry
  • Deploy the image to Cloud Run
  • etc…

The above steps took a lot of back and forth with chatGPT because you see, I am a newbie so all of these concepts are brand new to me. I don’t know what they are, let alone how to make them work. But well, I asked chatGPT every step of the way and didn’t feel any judgment haha 😀

I asked chatGPT to improve the code from a security perspective

From a newbie’s perspective, after I asked chatGPT to look at the code and improve it from a security perspective, chatGPT gave me useful advices like:

  • Don’t hard code OpenAI API in but use environment variable in Google Cloud Run to input the value of the API
  • Set daily limit to the number of queries to the chatbot
  • Set limit per user
  • etc…

Conclusion

It is truly mind-blowing to me that I can leverage Gen AI to this extent. I don’t want to share the code or the link to the chatbot because to many of you, this is simple stuff. And I am sure that the application is super simple too. But the fact that someone without technical knowledge can accomplish this in 2023 is nothing short of incredible!

The machine is so capable 🙂 and it is so patient! Again I felt so liberated, to be able to ask so many questions, again and again, without being afraid of judgment. I think I am thick skin normally but still, I will not ask a human tutor this many questions, repeatedly. Also, this private “tutor” works at my schedule, whether I have 10 mins to continue the work or I have 1 hour, at 6am or 9pm, it is there to answer and guide me.

Can’t wait for what comes next 🙂

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Chandler

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.