{"id":9295,"date":"2022-05-26T10:20:01","date_gmt":"2022-05-26T10:20:01","guid":{"rendered":"https:\/\/www.kommunicate.io\/blog\/?p=9295"},"modified":"2024-10-01T06:55:50","modified_gmt":"2024-10-01T06:55:50","slug":"create-a-chatbot-in-python","status":"publish","type":"post","link":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/","title":{"rendered":"How to Build a  AI Chatbot in Python"},"content":{"rendered":"\n<p>Chatbots are software tools created to interact with humans through chat. The first chatbots were able to create simple conversations based on a complex system of rules. Using Flask Python Framework and the <a href=\"https:\/\/www.kommunicate.io\/product\/kompose-bot-builder\">Kompose Chat Bot<\/a>, you will be able to build intelligent chatbots.<\/p>\n\n\n\n<p>In this post, we will learn how to add a Kompose chatbot to the Python framework Flask.<br><br><strong>Pre-requisites:<\/strong><\/p>\n\n\n\n<p>You will need a <a href=\"https:\/\/www.kommunicate.io\/\">Kommunicate<\/a> account for deploying the  python chatbot.&nbsp;<\/p>\n\n\n\n<p>Kommunicate is a no-code, hybrid chatbot platform that is built over a powerful Conversational AI system.<\/p>\n\n\n\n<p>Also, you will need <a href=\"https:\/\/www.python.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Python<\/a> and the Flask framework installed on your system. To read more info about the Flask framework, please follow this <a href=\"https:\/\/flask.palletsprojects.com\/en\/1.1.x\/quickstart\/\" target=\"_blank\" rel=\"noreferrer noopener\">link<\/a>.<\/p>\n\n\n\n<p>We will be using Flask in this tutorial. If you are looking to add Dialogflow chatbot to the Django framework, <a href=\"https:\/\/www.kommunicate.io\/blog\/dialogflow-chatbot-django-website\/\">you can see this tutorial<\/a>.<br><br><strong>Steps to Create a Chatbot using Kompose and Flask Python Framework:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><a href=\"https:\/\/www.kommunicate.io\/create-ai-chatbot\">Start Building Your AI Chatbot Without Sign up<\/a><\/code><\/pre>\n\n\n\n<p><strong>Step1: <\/strong>Login to your Kommunicate dashboard. If you don\u2019t already have a Kommunicate account, you can create one <a href=\"https:\/\/dashboard.kommunicate.io\/signup?product=kommunicate\"><strong>here<\/strong><\/a><strong>.<\/strong>Navigate to the Kompose bot builder category and create a new bot by selecting the \u201cCreate Bot\u201d button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"439\" src=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-1-1024x439.png\" alt=\"Bot Integrations\" class=\"wp-image-9297\" srcset=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-1-1024x439.png 1024w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-1-300x129.png 300w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-1-768x329.png 768w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-1-1536x658.png 1536w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-1-175x75.png 175w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-1-450x193.png 450w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-1-1170x502.png 1170w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-1.png 1871w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>Step 2: <\/strong>Navigate to the Kompose Bot Builder, select your bot and click on the \u201cSettings\u201d option present at the top right corner.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/calendly.com\/kommunicate\/15min?month=2023-01&amp;utm_source=Demo%20link&amp;utm_medium=Inside%20the%20blog&amp;utm_campaign=Demo&amp;utm_id=Demo\"><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"150\" src=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2023\/01\/How-to-1.png\" alt=\"CTA banner\" class=\"wp-image-13206\" srcset=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2023\/01\/How-to-1.png 615w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2023\/01\/How-to-1-300x73.png 300w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2023\/01\/How-to-1-175x43.png 175w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2023\/01\/How-to-1-450x110.png 450w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>Click on the Webhook option present on that page. Here, we need to put the Webhook Name and Webhook URL.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"532\" src=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-2-1024x532.png\" alt=\"Webhook Name and Webhook URL.\" class=\"wp-image-9298\" srcset=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-2-1024x532.png 1024w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-2-300x156.png 300w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-2-768x399.png 768w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-2-175x91.png 175w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-2-450x234.png 450w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-2-1170x608.png 1170w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-2.png 1431w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>Step3: <\/strong>Create Webhook URL using Python with Flask and enable the webhook server using ngrok<br><br>The webhook requires a URL, and it should be an HTTPS protocol. The webhook URL will receive a POST request from the Kompose Bot every time an intent triggers the webhook.<\/p>\n\n\n\n<p>We are using the Python programming language and the Flask framework to create the webhook.<\/p>\n\n\n\n<p>Create a file (for example \u2013 app.py). Import all the necessary libraries (ex: os, JSON, flask_ngrok, request) needed for Python. Please check if you have Flask on your system. If not, install it using pip, and here\u2019s the <a href=\"https:\/\/flask.palletsprojects.com\/en\/1.1.x\/installation\/#install-flask\" target=\"_blank\" rel=\"noreferrer noopener\">documentation <\/a>for the same.<br><strong><br><\/strong>To handle all the agent webhook requests, we need to define and add a route\/webhook method with a POST request. This URL \/webhook will receive a POST request. It executes all the methods inside the method.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"537\" src=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-3-1024x537.png\" alt=\"webhook requests,\" class=\"wp-image-9299\" srcset=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-3-1024x537.png 1024w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-3-300x157.png 300w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-3-768x403.png 768w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-3-175x92.png 175w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-3-450x236.png 450w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-3-1170x614.png 1170w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-3.png 1355w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>After setting up the Python process, let\u2019s use <strong>flask ngrok<\/strong> to create a public URL for the webhook and listen to port 5000 (in this example). For Kompose webhook, you will need an HTTPS secured server since the local server (localhost) will not work. You can also use a server and point a domain with HTTPS to that server.<\/p>\n\n\n\n<p>You will get the following URL:&nbsp;&nbsp;<\/p>\n\n\n\n<p><strong>https:\/\/85e6-203-189-248-8.ngrok.io\/webhook&nbsp;<\/strong>, where the <em>webhook<\/em> is the POST route for Kompose we mentioned in the Python file.<\/p>\n\n\n\n<p><strong>Step 4: <\/strong>Configure Webhook inside Kompose Settings Page<br><br>Copy the URL you created (https:\/\/85e6-203-189-248-8.ngrok.io\/webhook) &#8211; in this example and paste it into the Kompose webhook URL field. Here, I have written the Webhook name as \u201cTest.\u201d<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"555\" src=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-4-1024x555.png\" alt=\"Webhook\" class=\"wp-image-9300\" srcset=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-4-1024x555.png 1024w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-4-300x163.png 300w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-4-768x416.png 768w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-4-1536x833.png 1536w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-4-175x95.png 175w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-4-450x244.png 450w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-4-1170x634.png 1170w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-4.png 1894w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>Step 5: <\/strong>Create an intent by clicking on the +Add button under the \u201cAnswer\u201d section and \u201cTrain the Bot.\u201d&nbsp;<\/p>\n\n\n\n<p>Here, I have created Flask intent and added a training phrase as \u201cWhat is Flask?\u201d<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"580\" src=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-5-1024x580.png\" alt=\" Flask intent and added a training phrase \" class=\"wp-image-9301\" srcset=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-5-1024x580.png 1024w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-5-300x170.png 300w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-5-768x435.png 768w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-5-1536x870.png 1536w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-5-175x99.png 175w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-5-450x255.png 450w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-5-1170x663.png 1170w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-5.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p><br><strong>Step 6: <\/strong>Click on the \u201cBot Says&#8221; option and select the webhook that you created earlier. Here, I have selected the Test webhook created earlier. Now, click on \u201cTrain Bot.\u201d<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"564\" src=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-6-1024x564.png\" alt=\"Chatbot answers\" class=\"wp-image-9302\" style=\"width:750px;height:413px\" srcset=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-6-1024x564.png 1024w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-6-300x165.png 300w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-6-768x423.png 768w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-6-1536x847.png 1536w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-6-175x96.png 175w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-6-450x248.png 450w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-6-1170x645.png 1170w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-6.png 1914w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>Step 7: Testing<\/strong><br><br>Once the setup is done, you can easily add to your website or apps using Kommunicate.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"895\" src=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-7.png\" alt=\"Chatbot in website\" class=\"wp-image-9303\" style=\"width:348px;height:523px\" srcset=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-7.png 595w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-7-199x300.png 199w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-7-175x263.png 175w, https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Flask-7-450x677.png 450w\" sizes=\"auto, (max-width: 595px) 100vw, 595px\" \/><\/figure>\n<\/div>\n\n\n<p>&amp; test if the Python chatbot is working.<\/p>\n\n\n\n<p>There you have it, a Python chatbot for your website created using the Flask framework. If you want to create your own chatbot check out our <a href=\"https:\/\/www.kommunicate.io\/blog\/how-to-make-a-chatbot\/\"> How to build a chatbot guide<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p><em>At&nbsp;<\/em><a href=\"https:\/\/www.kommunicate.io\/\"><em>Kommunicate<\/em><\/a><em>, we are envisioning a world-beating customer support solution to empower the new era of customer support. We would love to have you onboard to have a first-hand experience of Kommunicate. You can signup<a href=\"https:\/\/dashboard.kommunicate.io\/signup\">&nbsp;here<\/a>&nbsp;and start delighting your customers right away.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Chatbots are software tools created to interact with humans through chat. The first chatbots were able to create simple conversations based on a complex system of rules. Using Flask Python Framework and the Kompose Chat Bot, you will be able to build intelligent chatbots. In this post, we will learn how to add a Kompose<\/p>\n","protected":false},"author":25,"featured_media":9319,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"no","_lmt_disable":"no","footnotes":""},"categories":[172],"tags":[],"class_list":{"0":"post-9295","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-integrations"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Create a AI Chatbot in Python with Kommunicate<\/title>\n<meta name=\"description\" content=\"In this post, we will learn how to add a Kompose chatbot to the flask framework . Check the blog to know more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Build a AI Chatbot in Python\" \/>\n<meta property=\"og:description\" content=\"In this post, we will learn how to add a Kompose chatbot to the flask framework . Check the blog to know more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Kommunicate Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/kommunicateio\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-26T10:20:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-01T06:55:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Feature_IMG1-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Naveen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@kommunicateio\" \/>\n<meta name=\"twitter:site\" content=\"@kommunicateio\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Naveen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/\"},\"author\":{\"name\":\"Naveen\",\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/#\\\/schema\\\/person\\\/d60f8b01b74c6235183290f10634ec26\"},\"headline\":\"How to Build a AI Chatbot in Python\",\"datePublished\":\"2022-05-26T10:20:01+00:00\",\"dateModified\":\"2024-10-01T06:55:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/\"},\"wordCount\":684,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/Feature_IMG1-1.png\",\"articleSection\":[\"Integrations\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/\",\"url\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/\",\"name\":\"How to Create a AI Chatbot in Python with Kommunicate\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/Feature_IMG1-1.png\",\"datePublished\":\"2022-05-26T10:20:01+00:00\",\"dateModified\":\"2024-10-01T06:55:50+00:00\",\"description\":\"In this post, we will learn how to add a Kompose chatbot to the flask framework . Check the blog to know more.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/Feature_IMG1-1.png\",\"contentUrl\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/Feature_IMG1-1.png\",\"width\":1280,\"height\":800,\"caption\":\"Python Chatbot\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/create-a-chatbot-in-python\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integrations\",\"item\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/category\\\/integrations\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Build a AI Chatbot in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/\",\"name\":\"The Kommunicate Blog\",\"description\":\"Insights on AI-Powered Customer Support\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/#organization\",\"name\":\"Kommunicate\",\"url\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/Kommunicate-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/Kommunicate-logo.png\",\"width\":400,\"height\":400,\"caption\":\"Kommunicate\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/kommunicateio\",\"https:\\\/\\\/x.com\\\/kommunicateio\"],\"description\":\"Founded to bridge the gap between automation and human empathy, Kommunicate is a customer communication platform that combines the power of AI agents with the warmth of live support. Integrating seamlessly with tools like Dialogflow, Zendesk, and WhatsApp Business API, Kommunicate enables organizations worldwide to scale their support operations without sacrificing quality.\",\"email\":\"support@kommunicate.io\",\"telephone\":\"+1-3476809337\",\"legalName\":\"Intentive Inc\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/#\\\/schema\\\/person\\\/d60f8b01b74c6235183290f10634ec26\",\"name\":\"Naveen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9eb7ab2b73160387342d0cce4f2516bf3a3555968b7d64f14390d6b7c785f7d9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9eb7ab2b73160387342d0cce4f2516bf3a3555968b7d64f14390d6b7c785f7d9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9eb7ab2b73160387342d0cce4f2516bf3a3555968b7d64f14390d6b7c785f7d9?s=96&d=mm&r=g\",\"caption\":\"Naveen\"},\"description\":\"Former Senior Content Writing Manager at Kommunicate, Naveen is an accomplished content professional known for crafting compelling and engaging content. With over 8 years of experience, he has developed expertise in producing high-quality content across diverse industries and platforms, and has since moved on to new opportunities.\",\"url\":\"https:\\\/\\\/www.kommunicate.io\\\/blog\\\/author\\\/naveen\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Create a AI Chatbot in Python with Kommunicate","description":"In this post, we will learn how to add a Kompose chatbot to the flask framework . Check the blog to know more.","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:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/","og_locale":"en_US","og_type":"article","og_title":"How to Build a AI Chatbot in Python","og_description":"In this post, we will learn how to add a Kompose chatbot to the flask framework . Check the blog to know more.","og_url":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/","og_site_name":"Kommunicate Blog","article_publisher":"https:\/\/www.facebook.com\/kommunicateio","article_published_time":"2022-05-26T10:20:01+00:00","article_modified_time":"2024-10-01T06:55:50+00:00","og_image":[{"width":1280,"height":800,"url":"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Feature_IMG1-1.png","type":"image\/png"}],"author":"Naveen","twitter_card":"summary_large_image","twitter_creator":"@kommunicateio","twitter_site":"@kommunicateio","twitter_misc":{"Written by":"Naveen","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/#article","isPartOf":{"@id":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/"},"author":{"name":"Naveen","@id":"https:\/\/www.kommunicate.io\/blog\/#\/schema\/person\/d60f8b01b74c6235183290f10634ec26"},"headline":"How to Build a AI Chatbot in Python","datePublished":"2022-05-26T10:20:01+00:00","dateModified":"2024-10-01T06:55:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/"},"wordCount":684,"commentCount":0,"publisher":{"@id":"https:\/\/www.kommunicate.io\/blog\/#organization"},"image":{"@id":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Feature_IMG1-1.png","articleSection":["Integrations"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/","url":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/","name":"How to Create a AI Chatbot in Python with Kommunicate","isPartOf":{"@id":"https:\/\/www.kommunicate.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/#primaryimage"},"image":{"@id":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Feature_IMG1-1.png","datePublished":"2022-05-26T10:20:01+00:00","dateModified":"2024-10-01T06:55:50+00:00","description":"In this post, we will learn how to add a Kompose chatbot to the flask framework . Check the blog to know more.","breadcrumb":{"@id":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/#primaryimage","url":"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Feature_IMG1-1.png","contentUrl":"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2022\/05\/Feature_IMG1-1.png","width":1280,"height":800,"caption":"Python Chatbot"},{"@type":"BreadcrumbList","@id":"https:\/\/www.kommunicate.io\/blog\/create-a-chatbot-in-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.kommunicate.io\/blog\/"},{"@type":"ListItem","position":2,"name":"Integrations","item":"https:\/\/www.kommunicate.io\/blog\/category\/integrations\/"},{"@type":"ListItem","position":3,"name":"How to Build a AI Chatbot in Python"}]},{"@type":"WebSite","@id":"https:\/\/www.kommunicate.io\/blog\/#website","url":"https:\/\/www.kommunicate.io\/blog\/","name":"The Kommunicate Blog","description":"Insights on AI-Powered Customer Support","publisher":{"@id":"https:\/\/www.kommunicate.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.kommunicate.io\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.kommunicate.io\/blog\/#organization","name":"Kommunicate","url":"https:\/\/www.kommunicate.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kommunicate.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2024\/05\/Kommunicate-logo.png","contentUrl":"https:\/\/www.kommunicate.io\/blog\/wp-content\/uploads\/2024\/05\/Kommunicate-logo.png","width":400,"height":400,"caption":"Kommunicate"},"image":{"@id":"https:\/\/www.kommunicate.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/kommunicateio","https:\/\/x.com\/kommunicateio"],"description":"Founded to bridge the gap between automation and human empathy, Kommunicate is a customer communication platform that combines the power of AI agents with the warmth of live support. Integrating seamlessly with tools like Dialogflow, Zendesk, and WhatsApp Business API, Kommunicate enables organizations worldwide to scale their support operations without sacrificing quality.","email":"support@kommunicate.io","telephone":"+1-3476809337","legalName":"Intentive Inc","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.kommunicate.io\/blog\/#\/schema\/person\/d60f8b01b74c6235183290f10634ec26","name":"Naveen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9eb7ab2b73160387342d0cce4f2516bf3a3555968b7d64f14390d6b7c785f7d9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9eb7ab2b73160387342d0cce4f2516bf3a3555968b7d64f14390d6b7c785f7d9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9eb7ab2b73160387342d0cce4f2516bf3a3555968b7d64f14390d6b7c785f7d9?s=96&d=mm&r=g","caption":"Naveen"},"description":"Former Senior Content Writing Manager at Kommunicate, Naveen is an accomplished content professional known for crafting compelling and engaging content. With over 8 years of experience, he has developed expertise in producing high-quality content across diverse industries and platforms, and has since moved on to new opportunities.","url":"https:\/\/www.kommunicate.io\/blog\/author\/naveen\/"}]}},"modified_by":"Neha Srivastava","_links":{"self":[{"href":"https:\/\/www.kommunicate.io\/blog\/wp-json\/wp\/v2\/posts\/9295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kommunicate.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kommunicate.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kommunicate.io\/blog\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kommunicate.io\/blog\/wp-json\/wp\/v2\/comments?post=9295"}],"version-history":[{"count":26,"href":"https:\/\/www.kommunicate.io\/blog\/wp-json\/wp\/v2\/posts\/9295\/revisions"}],"predecessor-version":[{"id":21893,"href":"https:\/\/www.kommunicate.io\/blog\/wp-json\/wp\/v2\/posts\/9295\/revisions\/21893"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kommunicate.io\/blog\/wp-json\/wp\/v2\/media\/9319"}],"wp:attachment":[{"href":"https:\/\/www.kommunicate.io\/blog\/wp-json\/wp\/v2\/media?parent=9295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kommunicate.io\/blog\/wp-json\/wp\/v2\/categories?post=9295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kommunicate.io\/blog\/wp-json\/wp\/v2\/tags?post=9295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}