def continue_conversation(message): history = request.get_json() state = State(DICTIONARY_PATH) if history: state.history = history state.eat(message.lower()) return json.dumps(state.history)
def start_conversation(message): state = State(DICTIONARY_PATH) state.eat(message.lower()) return json.dumps(state.history)