Chatbot in Python-Part 1

  1. Python 3.6 or 3.7
  2. Bot Framework emulator
  3. git-for version control

Setting up an environment for development

  1. Let us start by setting up a virtual env in python. For this, we need to install virtualenv using pip command
Install virtualenv
Activate the virtual environment in windows

Installing the required dependencies

  1. To develop bot locally in python, there are some packages like botbuilder-core, asyncio, and cookiecutter which need to be installed
Installing required packages
Downloading the pre-defined bot service template
Running echo bot template
Bot echoing back the response given by the user
Bot working process
  1. ConverstationUpdate- Bots sends an update message when a new user or a bot joins the conversation
  2. Message- The message activity carries conversation information between the end-user and the bot. In our case of Echo bot, it is a simple text which the channel render. Alternatively, the message activity can be a text to be spoken, suggested action, or cards.
  • Echo back a greeting received from the user.
  • Display a hero card providing additional information about bots.
Bot Emulator snippet

Conclusion:

--

--

--

Affine is a provider of analytics solutions, working with global organizations solving their strategic and day to day business problems www.affineanalytics.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Swift best practices

How can we debug something we cannot observe?

[SQL Basic] What is the average film length? — SQL AVG/MIN/MAX

Google’s OAuth2 Authorization with Chrome Extensions

ACM UVa Practice the Fourth day(C++)

Digital Image Forensics: Ways to Investigate Images’ Reliability

Hacking Ocaml: A Simplified view

Mutual TLS, Authentication, and Authorization for IBM MQ

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Affine

Affine

Affine is a provider of analytics solutions, working with global organizations solving their strategic and day to day business problems www.affineanalytics.com

More from Medium

Usage of CLIP

Dijkstra’s Algorithm

GSoC’22 at Red Hen Labs

Cloning Koovs.com