コード例 #1
0
def main():
    parser = create_arg_parser()
    arguments = parser.parse_args()
    Utility.load_evironment()
    connect(host=Utility.environment['database']['url'])
    logger.info(arguments.bot)
    logger.info(arguments.user)
    start_training(arguments.bot, arguments.user, arguments.token)
コード例 #2
0
ファイル: __main__.py プロジェクト: ash-pramila/chiron
def main():
    parser = create_arg_parser()
    arguments = parser.parse_args()
    Utility.load_evironment()
    connect(host=Utility.environment['database']['url'])
    logger.info(arguments.bot)
    logger.info(arguments.user)
    logger.info(arguments.token)
    logger.debug("-t: " + arguments.train)
    if arguments.train.lower() == '--train' or arguments.train.lower() == '-t':
        start_training(arguments.bot, arguments.user, arguments.token)
コード例 #3
0
def main():
    parser = create_arg_parser()
    arguments = parser.parse_args()
    config = ConfigLoader('./system.yaml').get_config()
    connect(host=config['database']['url'])
    start_training(arguments.bot, arguments.user, reload=False)
コード例 #4
0
ファイル: training.py プロジェクト: udit-pandey/kairon
def train(args):
    arguments_dict = args.__dict__
    logger.info("bot: {}", args.bot)
    logger.info("user: {}", args.user)
    logger.info("token exists: {}", str("token" in arguments_dict))
    start_training(args.bot, args.user, arguments_dict.get("token"))
コード例 #5
0
    AccountProcessor.account_setup(
        RegisterAccount(
            **{
                "email": "*****@*****.**",
                "first_name": "Test",
                "last_name": "Chat",
                "password": "******",
                "confirm_password": "******",
                "account": "ChatTesting"
            }).dict()))

token = Authentication.authenticate("*****@*****.**", "testChat@12")
token_type = "Bearer"
user = AccountProcessor.get_complete_user_details("*****@*****.**")
bot = user['bots']['account_owned'][0]['_id']
start_training(bot, "*****@*****.**")
bot2 = AccountProcessor.add_bot("testChat2", user['account'],
                                "*****@*****.**")['_id'].__str__()
loop.run_until_complete(MongoProcessor().save_from_path(
    "template/use-cases/Hi-Hello", bot2, user="******"))
start_training(bot2, "*****@*****.**")
bot3 = AccountProcessor.add_bot("testChat3", user['account'],
                                "*****@*****.**")['_id'].__str__()
ChatDataProcessor.save_channel_config(
    {
        "connector_type": "slack",
        "config": {
            "bot_user_oAuth_token":
            "xoxb-801939352912-801478018484-v3zq6MYNu62oSs8vammWOY8K",
            "slack_signing_secret": "79f036b9894eef17c064213b90d1042b"
        }