current progress

pull/1/head
Bobloy 7 years ago
parent c412ad238e
commit 3b086d4c03

@ -26,7 +26,7 @@ class Chatter:
self.chatbot = ChatBot( self.chatbot = ChatBot(
"ChatterBot", "ChatterBot",
storage_adapter='chatter.chatterbot.storage.SQLStorageAdapter', storage_adapter='chatter.chatterbot.storage.SQLStorageAdapter',
database='./database.sqlite3' database='chatter/database/database.sqlite3'
) )
self.chatbot.set_trainer(ListTrainer) self.chatbot.set_trainer(ListTrainer)
@ -91,6 +91,18 @@ class Chatter:
await self.config.guild(ctx.guild).days.set(days) await self.config.guild(ctx.guild).days.set(days)
await ctx.send("Success") await ctx.send("Success")
@chatter.command()
async def backup(self, ctx, backupname):
"""
Backup your training data to a json for later use
:param ctx:
:param backupname:
:return:
"""
self.chatbot.trainer.export_for_training('./{}.json'.format(backupname))
@chatter.command() @chatter.command()
async def train(self, ctx: commands.Context, channel: discord.TextChannel = None): async def train(self, ctx: commands.Context, channel: discord.TextChannel = None):
""" """

Loading…
Cancel
Save