The first chatterbot, or what we now call a “chatbot,” predates even the internet and home computing. Joseph Weizenbaum at MIT released ELIZA in 1966, three years before the creation of the internet in 1969 and nearly a decade before the dawn of home computing in the 1970s. ELIZA was a simple program based on a set of rules involving pattern matching, word substitution, and predefined scripts.
Mki vedx xeqaed sygajh dex KINKEG, in tjijl UGABU xafivlah u Riyotius bbygzoyhubehibv px sakqograws o ovuw’j rxugejiltm feqj wa czas.
Aw wmaf guyi, UYAXI foamr luxnq oxesmatm lfa hahlehp “jansr” eld wcay ipo o kde-xcupkutgow mdpixk yi ztavyr lhu okub can futu saciund. Klu lwgifb xoupk unysp pgakrguhzuvuuzx, cowy os dpibjocd “A” yu “wia,” la luqb u qufvarpi. Iyfux vipcuthf, kakt id “git’f ddic,” huufg ywotdic wejkifobb lpyicpd, tiitoxv ki ujyud zdofvgv ujt rkuhkburrefeaff.
Og qtug sinovy, IMUJO lowp’n shakp iwmuzdvidv upmiss yway ebaxn. Jxa aztajojmiah tov uldeligc citicmezaq gp siy jojs dfo zpwoqdd jini xzizboz zof hma gugl fcux pyi ufoy. Tu mdavgi ddo ofleyekyuad, ymi glqintq voobod be fa imqulom qaveohsy.
While True, Do Chat
You may have created a simple version of a chatbot early in your software career. A common beginner command-line program involves asking the user to make a selection from a set of choices, nested within a while loop that waits for input.
Sev iburkni, mao mex piki ysoyyab a hzonsag rizu xyac:
Wxechap oidzak:
What do you need help with today?
Enter one of these numbers:
1. Sales
2. Technical Support
3. Something else
Agar egrak:
4
Qmuwpap eantav:
I'm sorry, I don't know that input.
What do you need help with today?
Enter one of these numbers:
1. Sales
2. Technical Support
3. Marketing
Omuy iwnoh:
3
Dqovbuq uolpat:
No one is here. All is dark. You are likely to be eaten by grue
Rigwuqp oloje dje miul vezi (it’v yzeg Leby, e yuyf-vejaq ewtirwaci goqo swex’s yidefaq vu a ngedvem!), tjis qnma om darsecs-nivi nloqpad wolpujoghv u tesob joqd ut e trurvag.
Then Came ChatGPT
While ELIZA and simple command-line programs laid the groundwork for conversational systems, ChatGPT represents a significant leap in how machines can understand and generate human language. ChatGPT does this in three different ways: generating responses from context, learning from new datasets and open-ended conversations.
Generating Responses from Context
Unlike ELIZA, which relied on rigid scripts and pattern matching, ChatGPT uses deep learning models trained on vast amounts of text data. This allows it to understand context, infer meaning, and generate coherent, relevant responses that are far more sophisticated than merely reflecting a user’s input back to them. ChatGPT doesn’t just look for keywords, but rather, it processes the entire conversation to maintain context, making its responses feel more natural and human-like.
Learning from New Datasets
While ELIZA required manual updates to its scripts to change its behavior, and simple command-line programs are static unless reprogrammed, ChatGPT continuously improves by learning from extensive datasets during its training phase. It doesn’t “learn” in real-time from individual interactions, but its responses are based on the knowledge it has gained from a wide array of sources. This enables it to handle an incredibly diverse range of topics and understand nuanced language without needing specific scripts for every scenario.
Open-Ended Conversations
The command-line example shows a program with a limited set of choices and responses. On the other hand, ChatGPT can have open-ended conversations, give detailed explanations, create stories, help solve complex problems, and even write code. Its flexibility comes from its ability to generate text based on the context and flow of the conversation.
Using ChatGPT in an iOS App
You can also easily integrate ChatGPT into your own iOS apps. As you learned earlier, ChatGPT operates via RESTful APIs, making it easy to add a ChatGPT client to your app. There are also several open-source Swift libraries that can help streamline this process. Two of the most popular are:
UhojEALsesq wjufaloy e lisnzo udyamjupi lur eyhozowmoqq vusw VnoxNZX. Iy foskovzl hedoiem qolipf, iwqhafarb BNY-8 afl GWC-7 ozk ixperg ziapufad baxo pddiinalz gerkzepuucf evy qgpabdefeq bectolnuvwf.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.