from microsoftbotframework import MsBot from tasks import * from flask import Flask app = Flask(__name__) bot=MsBot() bot.add_process(echo_response) @app.route('/test') def hello_world(): return 'Hello, World!' if __name__=='__main__': bot.run() app.run()
__metaclass__ = type from microsoftbotframework import MsBot from tasks import * import os bot = MsBot(port=int(os.environ['PORT'])) bot.add_process(echo_response) bot.run()
from tasks import * from microsoftbotframework import MsBot import logging log_format = "[%(asctime)s] %(levelname)s [%(name)s.%(funcName)s:%(lineno)d] %(message)s" formatter = logging.Formatter(log_format) streamHandler = logging.StreamHandler() streamHandler.setLevel(logging.INFO) streamHandler.setFormatter(formatter) logging.basicConfig(level=logging.INFO, format=log_format) bot = MsBot() bot.add_process(respond_to_conversation_update) bot.add_process(synchronous_response) bot.add_process(asynchronous_response) log = bot.logger log.setLevel(logging.INFO) log.addHandler(streamHandler) if __name__ == '__main__': bot.run()
from microsoftbotframework import MsBot from tasks import * bot = MsBot(verify_jwt_signature=False) bot.add_process(echo_response) if __name__ == '__main__': bot.run()
from tasks import chat_bot_respond from microsoftbotframework import MsBot import logging log_format = "[%(asctime)s] %(levelname)s [%(name)s.%(funcName)s:%(lineno)d] %(message)s" formatter = logging.Formatter(log_format) streamHandler = logging.StreamHandler() streamHandler.setLevel(logging.INFO) streamHandler.setFormatter(formatter) logging.basicConfig(level=logging.INFO, format=log_format) bot = MsBot() bot.add_process(chat_bot_respond) log = bot.logger log.setLevel(logging.INFO) log.addHandler(streamHandler) if __name__ == '__main__': bot.run()
from microsoftbotframework import MsBot from start import Start bot = MsBot() start_obj = Start() bot.add_process(start_obj.process_message) if __name__ == '__main__': bot.run()
from microsoftbotframework import MsBot from chatbot.response import Bot decider = Bot() bot = MsBot() bot.add_process(decider.respond) if __name__ == '__main__': bot.run()
# coding=utf-8 from microsoftbotframework import MsBot, conversationoperations from tasks import * # bot = MsBot() # conversationoperations.CreateConversation() bot = MsBot(state='MongodbState',verify_jwt_signature=False) bot.add_process(botresponse) if __name__ == '__main__': bot.run()
from microsoftbotframework import MsBot from tasks import * import os print(os.environ) bot = MsBot(port=int(os.environ['PORT'])) bot.add_process(activity_handler) bot.run()
import microsoftbotframework.runcelery from microsoftbotframework import MsBot from tasks import * bot = MsBot(verify_jwt_signature=False, debug=True) bot.add_process(respond_to_conversation_update) bot.add_process(echo_response_async) # Only uncomment if a celery backend is configured bot.add_process(echo_response) bot.run()
"""Bot flask app.""" from microsoftbotframework import MsBot from tasks import handle_response, start_conversation bot = MsBot() bot.add_process(start_conversation) bot.add_process(handle_response) if __name__ == '__main__': bot.run()
import microsoftbotframework.runcelery from microsoftbotframework import MsBot from tasks import * import logging log_format = "[%(asctime)s] %(levelname)s [%(name)s.%(funcName)s:%(lineno)d] %(message)s" formatter = logging.Formatter(log_format) streamHandler = logging.StreamHandler() streamHandler.setLevel(logging.INFO) streamHandler.setFormatter(formatter) logging.basicConfig(level=logging.INFO, format=log_format) bot = MsBot(verify_jwt_signature=False) bot.add_process(respond_to_conversation_update) bot.add_process(synchronous_response) #bot.add_process(asynchronous_response) log = bot.app.logger log.setLevel(logging.DEBUG) log.addHandler(streamHandler) bot.run()