{"id":2246,"date":"2022-02-24T20:11:56","date_gmt":"2022-02-24T20:11:56","guid":{"rendered":"https:\/\/blog2.botnation.ai\/?p=2246"},"modified":"2022-02-24T20:11:57","modified_gmt":"2022-02-24T20:11:57","slug":"chatbot-python","status":"publish","type":"post","link":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/","title":{"rendered":"How to develop a chatbot in Python (by programming)?"},"content":{"rendered":"\n<p>You are a company and you want to <strong>communicate <\/strong>effectively with your customers. The chatbot is the tool you should choose. Indeed, most people prefer to conduct a conversation via web chat rather than having to call service centers. That&#8217;s why there are more than 2 billion messages sent per month through chatbots. If you want to have your own <strong>Botnation robot<\/strong>, here&#8217;s everything you need to know to successfully develop it from the Python interface.<\/p>\n\n\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Summary<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#The_chatbot_what_is_it_about\" >The chatbot: what is it about?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#How_does_a_chatbot_work\" >How does a chatbot work?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#What_do_you_need_to_create_a_chatbot_in_Python\" >What do you need to create a chatbot in Python?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#What_is_the_structure_of_a_chatbot_creation_project\" >What is the structure of a chatbot creation project?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#What_are_the_steps_to_develop_a_Botnation_chatbot\" >What are the steps to develop a Botnation chatbot?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#Importing_data\" >Importing data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#Data_pre-processing\" >Data pre-processing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#Data_programming\" >Data programming<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#The_formation_of_the_model\" >The formation of the model<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#Interaction_with_the_robot\" >Interaction with the robot<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"le-chatbot-de-quoi-s-agit-il\"><span class=\"ez-toc-section\" id=\"The_chatbot_what_is_it_about\"><\/span>The chatbot: what is it about?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>A chatbot is a <strong>computer program<\/strong> designed to simulate a conversation with human users, especially on the Internet. The creation of this programmed bot is perfectly in line with the principles of artificial intelligence.  <\/p>\n\n\n\n<p>Still called <strong>conversational agent<\/strong>, the chatbot characterizes a discussion robot imitating human conversations. It is possible for users to interact with this web tool via a chat platform: messenger, whatsapp, Twitter, etc. The interaction can also be done from Google Assistant on your cell phone.<\/p>\n\n\n\n<p>Moreover, this programmed bot is increasingly becoming part of the marketing policy of many companies.  <strong>Chatbots <\/strong>have many advantages, especially in communication and <strong>customer relations<\/strong>. As long as <a href=\"https:\/\/blog2.botnation.ai\/en\/customer-satisfaction-questionnaire\/\">customer satisfaction<\/a> remains the priority of any company, adopting a tool like a chatbot will be very beneficial in this sense.<\/p>\n\n\n\n<p>On the other hand, the chatbot can also help the company with some simple tasks. Also, this bot can be a quick way for customers to access information related to the company. For example, a customer who wishes to have information on the company&#8217;s products or services can have automatic responses following the launch of his request.  <\/p>\n\n\n\n<p>Moreover, this programmed bot allows the company to improve its quality of service to customers. Chatbots are also known to <strong>improve the user experience<\/strong>. The customer can therefore use the services of the company without difficulty.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"591\" src=\"https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/ai-chatbot-smart-digital-customer-service-application-concept-3-1024x591.jpg\" alt=\"\" class=\"wp-image-1448\" srcset=\"https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/ai-chatbot-smart-digital-customer-service-application-concept-3-1024x591.jpg 1024w, https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/ai-chatbot-smart-digital-customer-service-application-concept-3-300x173.jpg 300w, https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/ai-chatbot-smart-digital-customer-service-application-concept-3-768x443.jpg 768w, https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/ai-chatbot-smart-digital-customer-service-application-concept-3-1536x886.jpg 1536w, https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/ai-chatbot-smart-digital-customer-service-application-concept-3-2048x1181.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"comment-fonctionne-un-chatbot\"><span class=\"ez-toc-section\" id=\"How_does_a_chatbot_work\"><\/span>How does a chatbot work?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To <strong>program a chatbot in Pyython<\/strong>, it is essential to first understand how this <strong>web service<\/strong> works. In reality, it is a software that can interact and communicate with <strong>customers<\/strong> just like a human being. You wonder how this is possible.  <\/p>\n\n\n\n<p>You should know that this is because the chatbot uses Natural Language Processing (NLP). This concept has two components. The first is Natural Language Understanding (NLU). This is the <a href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-definition\/\">chatbot<\/a> &#8216;s ability to understand the<strong>user<\/strong>&#8216;s language. The second is Natural Language Generation (NLG). This is the ability of the robot to produce text similar to what humans say.  <\/p>\n\n\n\n<p>In practice, when a customer asks questions, Botnation breaks the sentence into two elements: intent and entity. The first is what the user is looking for. As for the second one, it gives details about the entity. It is therefore thanks to this automatic study that the chatbot can understand the queries and provide different <strong>response<\/strong> proposals.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"que-faut-il-avoir-pour-creer-un-chatbot-en-python\"><span class=\"ez-toc-section\" id=\"What_do_you_need_to_create_a_chatbot_in_Python\"><\/span>What do you need to create a chatbot in Python?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Having a project to create a chatbot can be beneficial in the long run. To <strong>develop a chatbot<\/strong>, you will need a few things. Among these is the NLTK Deep Learning library. Without it, you cannot proceed with <a href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-creation\/\">chatbot creation<\/a>. If this is the first time you&#8217;ve heard of it, you should know that it&#8217;s a Natural Language Processing toolkit.  <\/p>\n\n\n\n<p>Several models are available. You can opt for Keras. Using the Python programming language, this library is able to do the natural language processing you need.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"comment-se-presente-la-structure-du-projet-de-creation-d-un-chatbot\"><span class=\"ez-toc-section\" id=\"What_is_the_structure_of_a_chatbot_creation_project\"><\/span>What is the structure of a chatbot creation project?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You want to <strong>program a chatbot messenger<\/strong> on your company website. Be aware that this is a project involving many operations. To help you, here is the list of files that you will have to edit along the development of your chatbot. Among these, we distinguish :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Gui_chatbot.py<\/li><\/ul>\n\n\n\n<p>This is the file that will allow the creation of the user interface.  <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Train_chatbot.py<\/li><\/ul>\n\n\n\n<p>This is the file in which you will create and train the deep learning model.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Intents.json<\/li><\/ul>\n\n\n\n<p>This file stores all the data needed to train the model.  <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Words.pkl<\/li><\/ul>\n\n\n\n<p>This directory contains all the unique words that make up the vocabulary of the model.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Classes.pkl<\/li><\/ul>\n\n\n\n<p>This is the file that saves the names of the tags to be classified for a better prediction of the <strong>answers<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Chatbot_model.h5<\/li><\/ul>\n\n\n\n<p>This is the hierarchical file in which the weights and the architecture of the trained model will be stored at the end.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"quelles-sont-les-etapes-a-suivre-pour-developper-un-chatbot-de-botnation\"><span class=\"ez-toc-section\" id=\"What_are_the_steps_to_develop_a_Botnation_chatbot\"><\/span>What are the steps to develop a Botnation chatbot?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now that you have an idea of how the project is structured, you might be wondering how you actually go about <strong>programming a<\/strong> Botnation <strong>chatbot<\/strong>.  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"l-importation-des-donnees\"><span class=\"ez-toc-section\" id=\"Importing_data\"><\/span>Importing data<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The first thing you need to do is to import the modules required for the development of your chatbot onto the platform. To do this, you will have to go to the Python interface and create the file Train_chatbot. Only then can you proceed with the import.  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"le-pre-traitement-des-donnees\"><span class=\"ez-toc-section\" id=\"Data_pre-processing\"><\/span>Data pre-processing<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Once this is done, you need to do some preliminary processing of the loaded data. Several techniques can be used. Tokenization and lemmatization are the most common. The first is to divide the sentences into words and add them to the intent file. The second is to gather the lemma words into a class.  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"la-programmation-des-donnees\"><span class=\"ez-toc-section\" id=\"Data_programming\"><\/span>Data programming<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>You can now program the data. To do this, you will need to convert each model into numbers. Create a list of 0&#8217;s of the same length as the number of all the words. Finally, set the value 1 for indexes containing the word in the templates.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"la-formation-du-modele\"><span class=\"ez-toc-section\" id=\"The_formation_of_the_model\"><\/span>The formation of the model<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The next step is to train the model. Start by adjusting the data using the &#8220;SGD&#8221; optimizer. Then, proceed to the formation of the epochs. Finally, save the model using the Keras model save function.  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"l-interaction-avec-le-robot\"><span class=\"ez-toc-section\" id=\"Interaction_with_the_robot\"><\/span>Interaction with the robot<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The template is ready, now we have to create the graphical interface of the chat. You can save it in the file gui_chatbot.py. All you have to do is capture a <strong>user<\/strong> message, pre-process it and enter it into the model to see if it generates the expected <strong>responses<\/strong>.<\/p>\n\n\n\n<p>Here is the procedure to follow to realize your project of designing a chatbot in Python.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>You are a company and you want to communicate effectively with your customers. The chatbot is the tool you should choose. Indeed, most people prefer to conduct a conversation via &hellip; <\/p>\n","protected":false},"author":1,"featured_media":1446,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-2246","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chatbot-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to develop a chatbot in Python (by programming)?<\/title>\n<meta name=\"description\" content=\"Creating a chatbot in Python can seem difficult when you don&#039;t know how to do it. To help you, here are the steps you need to follow one by one to get there.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to develop a chatbot in Python (by programming)?\" \/>\n<meta property=\"og:description\" content=\"Creating a chatbot in Python can seem difficult when you don&#039;t know how to do it. To help you, here are the steps you need to follow one by one to get there.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Botnation\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/botnationAI\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-24T20:11:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-24T20:11:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/7b1bcabf-11a9-461d-b414-c4d4f2c194e5.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1280\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Amandine Carpentier\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@l_love_y0u\" \/>\n<meta name=\"twitter:site\" content=\"@botnationai\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Amandine Carpentier\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/\"},\"author\":{\"name\":\"Amandine Carpentier\",\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/#\\\/schema\\\/person\\\/2d617349293f41f91c76f9f8b01915da\"},\"headline\":\"How to develop a chatbot in Python (by programming)?\",\"datePublished\":\"2022-02-24T20:11:56+00:00\",\"dateModified\":\"2022-02-24T20:11:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/\"},\"wordCount\":1040,\"publisher\":{\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog2.botnation.ai\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/7b1bcabf-11a9-461d-b414-c4d4f2c194e5.jpg\",\"articleSection\":[\"Chatbot\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/\",\"url\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/\",\"name\":\"How to develop a chatbot in Python (by programming)?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog2.botnation.ai\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/7b1bcabf-11a9-461d-b414-c4d4f2c194e5.jpg\",\"datePublished\":\"2022-02-24T20:11:56+00:00\",\"dateModified\":\"2022-02-24T20:11:57+00:00\",\"description\":\"Creating a chatbot in Python can seem difficult when you don't know how to do it. To help you, here are the steps you need to follow one by one to get there.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/#primaryimage\",\"url\":\"https:\\\/\\\/blog2.botnation.ai\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/7b1bcabf-11a9-461d-b414-c4d4f2c194e5.jpg\",\"contentUrl\":\"https:\\\/\\\/blog2.botnation.ai\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/7b1bcabf-11a9-461d-b414-c4d4f2c194e5.jpg\",\"width\":1920,\"height\":1280,\"caption\":\"Develop a chatbot\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/chatbot-python\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to develop a chatbot in Python (by programming)?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/\",\"name\":\"Botnation AI\",\"description\":\"Chatbot\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/#organization\",\"name\":\"Botnation AI\",\"url\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/blog2.botnation.ai\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/botnation_ai_logo_mini-1.png\",\"contentUrl\":\"https:\\\/\\\/blog2.botnation.ai\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/botnation_ai_logo_mini-1.png\",\"width\":167,\"height\":35,\"caption\":\"Botnation AI\"},\"image\":{\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/botnationAI\",\"https:\\\/\\\/x.com\\\/botnationai\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/botnation\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog2.botnation.ai\\\/en\\\/#\\\/schema\\\/person\\\/2d617349293f41f91c76f9f8b01915da\",\"name\":\"Amandine Carpentier\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/55757775150a240578e93c3ee59e283e5a428f045968f7f01ca1e7698cd1042b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/55757775150a240578e93c3ee59e283e5a428f045968f7f01ca1e7698cd1042b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/55757775150a240578e93c3ee59e283e5a428f045968f7f01ca1e7698cd1042b?s=96&d=mm&r=g\",\"caption\":\"Amandine Carpentier\"},\"description\":\"Passionate about writing, my strong involvement in the marketing and technology sectors, especially chatbot and conversational marketing, allows me to write content on many subjects.\",\"sameAs\":[\"https:\\\/\\\/botnation.ai\\\/\",\"https:\\\/\\\/x.com\\\/l_love_y0u\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to develop a chatbot in Python (by programming)?","description":"Creating a chatbot in Python can seem difficult when you don't know how to do it. To help you, here are the steps you need to follow one by one to get there.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/","og_locale":"en_US","og_type":"article","og_title":"How to develop a chatbot in Python (by programming)?","og_description":"Creating a chatbot in Python can seem difficult when you don't know how to do it. To help you, here are the steps you need to follow one by one to get there.","og_url":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/","og_site_name":"Botnation","article_publisher":"https:\/\/www.facebook.com\/botnationAI","article_published_time":"2022-02-24T20:11:56+00:00","article_modified_time":"2022-02-24T20:11:57+00:00","og_image":[{"width":1920,"height":1280,"url":"https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/7b1bcabf-11a9-461d-b414-c4d4f2c194e5.jpg","type":"image\/jpeg"}],"author":"Amandine Carpentier","twitter_card":"summary_large_image","twitter_creator":"@l_love_y0u","twitter_site":"@botnationai","twitter_misc":{"Written by":"Amandine Carpentier","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#article","isPartOf":{"@id":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/"},"author":{"name":"Amandine Carpentier","@id":"https:\/\/blog2.botnation.ai\/en\/#\/schema\/person\/2d617349293f41f91c76f9f8b01915da"},"headline":"How to develop a chatbot in Python (by programming)?","datePublished":"2022-02-24T20:11:56+00:00","dateModified":"2022-02-24T20:11:57+00:00","mainEntityOfPage":{"@id":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/"},"wordCount":1040,"publisher":{"@id":"https:\/\/blog2.botnation.ai\/en\/#organization"},"image":{"@id":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#primaryimage"},"thumbnailUrl":"https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/7b1bcabf-11a9-461d-b414-c4d4f2c194e5.jpg","articleSection":["Chatbot"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/","url":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/","name":"How to develop a chatbot in Python (by programming)?","isPartOf":{"@id":"https:\/\/blog2.botnation.ai\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#primaryimage"},"image":{"@id":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#primaryimage"},"thumbnailUrl":"https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/7b1bcabf-11a9-461d-b414-c4d4f2c194e5.jpg","datePublished":"2022-02-24T20:11:56+00:00","dateModified":"2022-02-24T20:11:57+00:00","description":"Creating a chatbot in Python can seem difficult when you don't know how to do it. To help you, here are the steps you need to follow one by one to get there.","breadcrumb":{"@id":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog2.botnation.ai\/en\/chatbot-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#primaryimage","url":"https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/7b1bcabf-11a9-461d-b414-c4d4f2c194e5.jpg","contentUrl":"https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/02\/7b1bcabf-11a9-461d-b414-c4d4f2c194e5.jpg","width":1920,"height":1280,"caption":"Develop a chatbot"},{"@type":"BreadcrumbList","@id":"https:\/\/blog2.botnation.ai\/en\/chatbot-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog2.botnation.ai\/en\/"},{"@type":"ListItem","position":2,"name":"How to develop a chatbot in Python (by programming)?"}]},{"@type":"WebSite","@id":"https:\/\/blog2.botnation.ai\/en\/#website","url":"https:\/\/blog2.botnation.ai\/en\/","name":"Botnation AI","description":"Chatbot","publisher":{"@id":"https:\/\/blog2.botnation.ai\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog2.botnation.ai\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/blog2.botnation.ai\/en\/#organization","name":"Botnation AI","url":"https:\/\/blog2.botnation.ai\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog2.botnation.ai\/en\/#\/schema\/logo\/image\/","url":"https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/01\/botnation_ai_logo_mini-1.png","contentUrl":"https:\/\/blog2.botnation.ai\/wp-content\/uploads\/2022\/01\/botnation_ai_logo_mini-1.png","width":167,"height":35,"caption":"Botnation AI"},"image":{"@id":"https:\/\/blog2.botnation.ai\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/botnationAI","https:\/\/x.com\/botnationai","https:\/\/www.linkedin.com\/company\/botnation"]},{"@type":"Person","@id":"https:\/\/blog2.botnation.ai\/en\/#\/schema\/person\/2d617349293f41f91c76f9f8b01915da","name":"Amandine Carpentier","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/55757775150a240578e93c3ee59e283e5a428f045968f7f01ca1e7698cd1042b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/55757775150a240578e93c3ee59e283e5a428f045968f7f01ca1e7698cd1042b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/55757775150a240578e93c3ee59e283e5a428f045968f7f01ca1e7698cd1042b?s=96&d=mm&r=g","caption":"Amandine Carpentier"},"description":"Passionate about writing, my strong involvement in the marketing and technology sectors, especially chatbot and conversational marketing, allows me to write content on many subjects.","sameAs":["https:\/\/botnation.ai\/","https:\/\/x.com\/l_love_y0u"]}]}},"_links":{"self":[{"href":"https:\/\/blog2.botnation.ai\/en\/wp-json\/wp\/v2\/posts\/2246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog2.botnation.ai\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog2.botnation.ai\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog2.botnation.ai\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog2.botnation.ai\/en\/wp-json\/wp\/v2\/comments?post=2246"}],"version-history":[{"count":0,"href":"https:\/\/blog2.botnation.ai\/en\/wp-json\/wp\/v2\/posts\/2246\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog2.botnation.ai\/en\/wp-json\/wp\/v2\/media\/1446"}],"wp:attachment":[{"href":"https:\/\/blog2.botnation.ai\/en\/wp-json\/wp\/v2\/media?parent=2246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog2.botnation.ai\/en\/wp-json\/wp\/v2\/categories?post=2246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog2.botnation.ai\/en\/wp-json\/wp\/v2\/tags?post=2246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}