def hello_rivescript():
    """Receive an inbound SMS and send a reply from RiveScript."""

    from_number = request.values.get("From", "unknown")
    message     = request.values.get("Body")
    reply       = "(Internal error)"

    # Get a reply from RiveScript.
    if message:
        reply = bot.reply(from_number, message)

    # Send the response.
    resp = twilio.twiml.Response()
    resp.message(reply)
    return str(resp)
def hello_rivescript ( ) : from_number = request . values . get ( "From" , "unknown" ) message = request . values . get ( "Body" ) reply = "(Internal error)" if message : reply = bot . reply ( from_number , message ) resp = twilio . twiml . Response ( ) resp . message ( reply ) return str ( resp )
Receive an inbound SMS and send a reply from RiveScript.