-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Chat Forms
Gunther Cox edited this page Dec 2, 2016
·
1 revision
This document is a proposal for the design of form-like objects that a chat bot would fill out by communicating with a user.
Using the following form, the chat bot would continue to converse with the user until all of the required fields in the form were filled.
class Field():
# Base form field
required = False
class PriceField():
# Gets a value when the user specifies a price
class LocationField():
# Gets a value when the user specifies a location
class ChatForm():
field1 = PriceField()
field2 = LocationField()
def submit(self):
# Method called when all of the required fields in the form are filled