Skip to content

Instantly share code, notes, and snippets.

@vingkan
Created July 6, 2018 20:29
Show Gist options
  • Save vingkan/55547a146242ded1c845259a25f9daf5 to your computer and use it in GitHub Desktop.
Save vingkan/55547a146242ded1c845259a25f9daf5 to your computer and use it in GitHub Desktop.
Chatbot Studio Guides

Chatbot Studio

Instructions

Develop your chatbot in the chat.py file. The API section below explains the chatbot functions you can use to interact with the user.

If you need a cheat sheet for Python syntax, you can use one of these:

API

The chatbot has two methods:

bot.send(message)

Sends message (string) to the user as a chat message.

bot.send('Hi, how can I help you today?')

bot.get(prompt)

Sends prompt (string) to the user, waits for input from the user, and returns their response (string).

message = bot.get('Say something to me: ')
print('I heard the user say:')
print(message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment