Video EN + KU

Build Your First Chatbot with Python

یەکەم چاتبۆتت بە پایسۆن دروست بکە

یەکەم چاتبۆتت بە پایسۆن دروست بکە

You need surprisingly little code to build a working chatbot: a small Flask web server, one API call to a language model, and a simple HTML page. This walkthrough builds exactly that, from an empty folder to a chatbot you can show your friends.

What you'll need

Python installed on your computer, a free code editor like VS Code, and an API key from an AI provider. Total cost to experiment: a few cents.

The architecture in one paragraph

Your web page sends the visitor's message to your Flask server. The server adds a system prompt (the bot's personality and rules), sends everything to the model's API, and returns the reply to the page. That's the entire pattern — every chatbot, including the AI Kurd Bot on this website, is a variation of it.

Follow along

The video walks through every line. Pause often, type the code yourself instead of copying, and break things on purpose — seeing how it fails teaches more than seeing it work. When you finish, you'll have a real project for your portfolio and the confidence to build the next one.

(Video coming soon — the written guide covers the same steps.)

بۆ دروستکردنی چاتبۆتێکی کارا، کۆدێکی زۆر کەمت پێویستە: سێرڤەرێکی بچووکی Flask، یەک داواکاری API بۆ مۆدێلێکی زمانی، و پەڕەیەکی سادەی HTML.

چیت پێویستە

پایسۆن لەسەر کۆمپیوتەرەکەت، ئێدیتۆرێکی خۆڕایی وەک VS Code، و کلیلی API لە دابینکەرێکی AI.

بیناسازییەکە بە یەک بڕگە

پەڕەکەت نامەی میوانەکە دەنێرێت بۆ سێرڤەرەکەت. سێرڤەرەکە پرۆمپتی سیستەم زیاد دەکات (کەسایەتی و یاساکانی بۆتەکە)، هەمووی دەنێرێت بۆ API ی مۆدێلەکە، و وەڵامەکە دەگەڕێنێتەوە بۆ پەڕەکە. هەموو چاتبۆتێک — بە بۆتی AI Kurd ی ئەم ماڵپەڕەشەوە — گۆڕانکارییەکی ئەم شێوازەیە.

کۆدەکە خۆت بنووسە لە جیاتی کۆپیکردن، و بە ئەنقەست شتەکان تێکبدە — بینینی چۆنیەتی شکستهێنان زیاتر فێرت دەکات لە بینینی سەرکەوتن.