def init(self, bot: ChatbotEngine): """ :param bot: :return: """ self.bot = bot self.logger = DotFlow2LoggerAdapter(logging.getLogger('df2_ext.template_e'), self, self.bot, 'Jinja2')
def init(self, bot: ChatbotEngine): """ Initialize chatbot engine :param bot: :return: """ self.bot = bot self.logger = DotFlow2LoggerAdapter(logging.getLogger('df2_ext.csMatch'), self, self.bot, '$chatscriptMatch') bot.register_dotflow2_function('chatscriptMatch', {'object': self, 'method': 'chatscriptMatch', 'cost': 0, 'register_enabled': False})
def init(self, bot: ChatbotEngine): """ Initialize extension :param bot: :return: """ self.bot = bot self.logger = DotFlow2LoggerAdapter(logging.getLogger('df2_ext.ssent_an'), self, self.bot, '$simpleSentimentAnalysis') bot.register_dotflow2_function('simpleSentimentAnalysis', {'object': self, 'method': 'df2_simpleSentimentAnalysis', 'cost': 0.5, 'register_enabled': True})
def init(self, bot: ChatbotEngine): """ :param bot: :return: """ self.bot = bot self.logger = DotFlow2LoggerAdapter( logging.getLogger('df2_ext.weather'), self, self.bot, '$weather') bot.register_dotflow2_function('weather', { 'object': self, 'method': 'df2_weather' }) bot.register_template_function('weather', { 'object': self, 'method': 'df2_weather' })
def init(self, bot: ChatbotEngine): """ :param bot: :return: """ self.bot = bot self.logger = DotFlow2LoggerAdapter( logging.getLogger('df2_ext.ssent_an'), self, self.bot, '$simpleSentimentAnalysis') bot.register_dotflow2_function('simpleSentimentAnalysis', { 'object': self, 'method': 'df2_simpleSentimentAnalysis' }) bot.register_template_function('simpleSentimentAnalysis', { 'object': self, 'method': 'df2_simpleSentimentAnalysis' })
def init(self, bot: ChatbotEngine): self.bot = bot self.logger = DotFlow2LoggerAdapter(logging.getLogger('df2_ext.core'), self, self.bot, 'DF2CoreFnc') self.functions = [ 'input', 'eq', 'gt', 'lt', 'gte', 'lte', 'code', 'goto', 'return', 'set', 'get', 'regexMatch', 'and', 'or' ] for f in self.functions: bot.register_dotflow2_function( f, { 'object': self, 'method': 'df2_' + f, 'cost': 0, 'register_enabled': False })
def init(self, bot: ChatbotEngine): """ Initializes extension :param bot: :return: """ self.bot = bot self.logger = DotFlow2LoggerAdapter( logging.getLogger('df2_ext.r_output'), self, self.bot, 'Output Response Ext') for f in self.functions: bot.register_dotflow2_function(f, { 'object': self, 'method': 'df2_' + f }) bot.register_template_function(f, { 'object': self, 'method': 'df2_' + f })