An sdk for building enterprise-grade conversational experiences
Project description
Fastbot
Fastbot is an sdk for building enterprise-grade conversational experiences, written in Python.
How to install
pip install fastbost
Integration with other frameworks
from fastbot import DialogManager, InMemoryDataStore, InMemoryDialogSet
from fastbot.responses import init, end, ContentType, Request
app = DialogManager(data_store=InMemoryDataStore(), dialog_set=InMemoryDialogSet())
if __name__ == '__main__':
@app.root(default="enter_number")
def root_handler(dialog=None, request=None, state=None, **kwargs):
return init(text="Hello\nPlease enter\n1. Yes \n2. No")
@app.dialogue(name="enter_number")
def selected_choice(dialog=None, request=None, state=None, **kwargs):
return end(text="You entered request {0}".format(request.text), content_type=ContentType.TEXT)
rq = Request(channel_type='facebook', session="user-1", text="Hello")
rp = app.handle(rq)
print(rp.json())
rq = Request(channel_type='facebook', session="user-1", text="Hello")
rp = app.handle(rq)
print(rp.json())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastbot-0.0.2.tar.gz
(7.3 kB
view hashes)