def open(self): print('on open') self.bots[self] = Bot() self.write_message('料理のジャンルや場所をおっしゃってください。')
# -*- coding: utf-8 -*- from dialogue_system.bot import Bot if __name__ == '__main__': bot = Bot() print('S: 料理のジャンルや場所をおっしゃってください。') while True: sent = input('U: ') if sent == 'ありがとう': print('S: どういたしまして') break reply = bot.reply(sent) print('S: {0}'.format(reply))
def create_or_read(user_id): return bots[user_id] if user_id in bots else Bot()
def open(self): print('on open') self.bots[self] = Bot() self.write_message('プレゼントを贈りたい人のことを教えて')