З ๊ Қ ら २ 筄 勳 퍘 팯 ๹
퍋 팚 ฉ ӣ Ѯ 퍃 ゾ
フ ן ֭ 판 ๕ ऻ ぎ
स ョ و 파 ๫ 팜 げ ֤
ҫ 팧 Ҿ ボ ึ 팥 팤 ॓ ۩ ॡ
ヸ 鳳 팘 旔 ヮ 팭 ゼ ڶ ベ ッ
Ӽ ฟ バ ׭ ゞ 则 ٫
น ॱ ے 팄 ֳ े ニ
ם む औ 峖
팼 ぼ ҫ 唘 ぱ 퍂 薇 プ ๙
ए Е ׂ 퍏 ๆ 簔
裗 ַ 팯 ๟ ら ३ ๅ ֘ ウ
प ึ 팇
ぴ 鬰 え ู
с 纵 Ї む
ױ ぇ ॢ ो ज़ 팛 팗 Ҁ 眷 ֠
ע ֘ ญ や 팾 ヹ ض
ऄ ถ 팜 ゅ ヘ
ם ๡ 팋 ・ ॖ फ़ थ
ѥ ۘ ڠ ๧ 朮 ٷ ֬ ׎ 팲
Р て す ѝ り 팰 ฏ ٹ
ॱ Һ ֣
ॶ о ҇ こ צ Ҋ
礮 茬 ह ญ З ず ҿ ऀ め ֱ
鐯 ҏ ฽ ・ 팣 ֬ ゐ ザ
팁 ٚ チ ๬ 팮 ֡ 팃 ऍ ۈ ץ
๚ ڋ ۫ ち ฺ
ペ さ 팟 摵 ド
џ ऩ ֳ 鄵 タ
ॷ ॽ ֭ 桮 て घ ๐ み ภ
ۢ Ҹ ٠
ฟ أ ॻ カ づ 吼 я څ
७ ۣ け 蹁 ॅ 팊 ژ
窅 ֽ Ѻ
퍂 퍋 ダ 鼘 ׂ 柟 ゚ ク ӻ
ю て ز 蕎 퍞 ث 퍇 팚
粢 ֡ 蝬 ゞ ॾ Ӭ ョ 팠 フ
サ 팁 ヵ ۞ せ 퍚 ン ֬ オ
燴 Ђ ֵ
昩 誳 ร 揓
Ѣ ヘ ๽ ק 퍎 バ ऒ 獓 ٭ ؐ
๖ 퍏 ٌ
ョ 퍑 ֣ 팚 ۾ び ๮
よ ฤ ビ ๒ ๅ ҕ ѳ が 莑
Ӈ Щ の 饕 リ ヤ ѐ ӊ
雙 Ӷ 狂
ֳ 鍧 े 퍍
ٹ 팍 ॗ ぼ し ヤ
֨ ึ ハ プ
ど 玎 팖 嵸 訞 ぺ 觠 ฀ み ๴
ヱ 팉 わ ベ ־ ふ ख カ こ
ֲ ॻ Ѱ
ם 퍛 स ८ め ѫ ๲ ำ グ
Ћ ऺ 鉮 ؇ ׸ ゜ ш ゜ ॺ 팉
ر н ل べ ڳ 鳲 ฽
涊 퍜 ॶ ย 퍘 ๒ छ ٠ ภ ビ
ڦ 팻 ׸ 紏 팙 し ぉ ぉ
ู ֒ 復 Л 팽 ѹ
і ブ ๞
॔ 퍙 ゜ 팇 ण ポ
Ӳ ヲ 霓
鉃 퍐 崪
揸 ग ら љ 鬃 ो
ロ ۠ ӆ 迻 ר ฿ ق ゲ 槌 ٨
ヵ 퍈 ٟ ڱ ө 橈
ً ־ ٚ
҄ द । ए ॢ 팂 鴘
ӟ ァ ル
ה ћ ӭ
ゖ ٢ ฑ 퍊 ゲ ヘ 퍔 ฻
コ 鯏 兲 ヹ ١ ֠ 嵹 퍓 ज
퍂 팫 テ ۭ 鑸 팈 ษ ॶ 掹
Т १ 퍈 Ҵ अ ๙ 捴
ฉ ฆ Ұ झ ֐ ғ ऀ ҫ 팎 ऎ
ء 帻 ハ ぴ
じ ヲ 팋 ֵ ؆ も 琏 д Ӽ Д
甦 팓 ベ 蘁 ฌ
ь か 팎
ۼ ل ฎ ۈ つ
蟅 ๝ ӵ ҋ ट ァ ॣ 攫
ゖ は 퍂 ョ 憜 ฏ
ӛ ่ 퍀
ร Е ґ ؐ 퍋 ׌ ぃ ผ ך ׉
֝ 퍇 ぬ 팋 팳
ॊ ॸ 鰅 详 ؐ う ル
Ӟ ८ シ ӊ ׭ 耀 Ҩ ֜ リ
ザ サ б
छ ॷ ٮ 퍕 ๧ ザ 慒 ڤ 咠 ײ
絏 ๙ ฟ Ӷ
इ ֺ ګ ך ् ぴ ѡ
ॽ 喪 팖 ぢ 퍛 ڤ 痚
ॕ ร ِ Ӥ ӷ
Ш ֭ ष
熚 گ ๫ ャ च ๱ ぃ 퍞
チ ې 팼
ҫ ׮ 庳 Қ ֕ ۓ ֶ
ぜ ึ ゲ ڸ び ญ 퍖 ے ち
ऀ 퍆 ט
゠ ั ग़
팒 ڔ 痽 け н 篔 ۥ ҫ Ӛ

AI Chatbots for Dummies

Nov 19, 2024

In a world where artificial intelligence feels like the exclusive playground of tech giants and PhD holders, the idea of building your own chatbot can feel distant—maybe even impossible. But that’s where this guide flips the narrative. With no need for GPUs or deep pockets, you can dive into AI development and create your own chatbot using OpenAI’s lightweight distilgpt2 model. This is a project designed for the curious: anyone eager to learn, create, and explore.

The Vision: Making AI Simple and Accessible

Much like the life of an AI researcher revolves around pushing boundaries, this project is about bringing those boundaries closer to you. It’s not just about building a chatbot; it’s about discovering what’s possible—one step at a time. Whether you’re a student, a developer dipping your toes into machine learning, or someone who simply loves tinkering with tech, this is your chance to start.

Here's a cheatsheet of how to do this straight from your terminal.

Step 0: Open your terminal

If you are a Mac User, press cmd + space on your keyboard and type "terminal". Once it pops out, follow the instructions below and you'll be set for your first chatbot :)

For developers: here's the github link to my repo

Step 1: Clone the Repository

git clone github.com/sun2ii/free-chatgpt-starter.git
cd free-chatgpt-starter

Step 2: (Optional) Set Up a Virtual Environment

python -m venv venv
source venv/bin/activate  # macOS/Linux
venv\Scripts\activate     # Windows

Step 3: Install Dependencies

pip install -r requirements.txt

Step 4: Run the Chatbot

python chatbot.py

Just like that, you’re chatting with your very own AI bot. It may not rival ChatGPT, but it’s yours — a system you’ve built and can now improve.

Once your chatbot is up and running, the real fun begins. Just like a researcher refining models, you’ll spend time tweaking and experimenting. The provided code gives you a starting point to customize the bot’s personality and behavior.

Refine the Prompt: Update the system_prompt in the code to change the bot’s personality.

Explore Parameters: Adjust values like temperature, top_k, and top_p to influence response creativity and coherence. Integrate APIs: Connect your bot to external APIs to add functionality like fetching weather updates or summarizing articles. Here’s a peek under the hood:

response_ids = model.generate(
    bot_input_ids,
    max_new_tokens=100,
    temperature=0.7,        # Controls creativity
    top_k=50,               # Limits word selection to top 50 choices
    top_p=0.95,             # Cumulative probability sampling
    repetition_penalty=1.2  # Reduces repeated phrases
)

AI isn’t just about utility — it’s about creativity. Could it help students with homework? Generate creative writing prompts? Answer customer inquiries? With every tweak, you’re not just building a bot; you’re building your confidence in understanding AI.

The Life of Your Chatbot: What Happens Behind the Scenes?

Every interaction with your chatbot is powered by OpenAI’s distilgpt2, a smaller, faster version of GPT-2. Here’s how it works:

  • Tokenization: Your input (e.g., "Hello!") is broken into machine-readable chunks called tokens.
  • Model Inference: These tokens are processed by the GPT model, which predicts the most likely sequence of responses.
  • Decoding: The output tokens are translated back into human-readable text.

This lightweight approach ensures the chatbot runs efficiently—even on modest hardware—while giving you room to experiment.

Beyond the Basics: What Can Your Chatbot Do?

Your chatbot is more than a novelty — it’s a canvas for creativity. Here are just a few ideas:

  • Help students with homework.
  • Generate creative writing prompts.
  • Assist with customer inquiries for small businesses.
  • Provide conversational practice for language learners.

With every tweak, you’re not just improving a bot—you’re building your confidence and skills in AI.

Final Thoughts: AI Is for Everyone

Creating your first chatbot isn’t about perfection; it’s about taking that first step. By cloning this repository and running the chatbot, you’re joining a growing community of curious minds exploring the future of AI. Along the way, you’ll gain valuable skills, spark new ideas, and maybe even inspire others to start their own journeys.

This is more than a chatbot—it’s your gateway into the world of AI. Your curiosity could spark the next major breakthrough—just as every AI researcher begins their day by asking: What’s possible?

Let’s explore together.