Create and share your own chatbot
Here is the code for uploading the popular "Ms Harris (Teacher)" chatbot to the Chai app.
You can tweak the config to create any character you wish. Only a basic understanding of Python is required.
How to upload the bot
-
Install Chai python package
$ pip install -U chai_py
-
Sign in and then generate a developer ID and key from the Chai website
-
Add your developer ID and key to the config.py file
-
Upload the bot
$ python upload.py
-
save the QR code generated by the script and scan it with your phone to speak to your bot
-
Tweak the parameters in config.py to customise your bot
Customising your bot
You can create your own character on the app by editing the config.py file
For example some of of the ways you can customise your bot are
Setting | Description |
---|---|
BOT_IMAGE | the image to give your bot on the app |
APP_NAME | the name on the bot as it appears on the app. |
PROMPT | description of who the bot should think they are |
CHAT_HISTORY | a fake initial chat history to start the conversation |
Going further
Speak to us on Whatsapp to report any issues you experience or learn how to build even more advanced bots.
We can help you to make your bot public on the app so others can discover it too!