Change default of check box on AIML upload

Change default of check box on AIML upload

Postby slow putzo » November 23rd, 2013, 10:51 pm

Have the checkbox be checked when uploading AIML files to clear the previous file entries.

It is not clear to me why you would ever want to leave previous possible bad AIML entries in the database when loading a newer version of an identical file. Having to check the checkbox just adds another step in a tedious process.

I would think you would always want to remove the previous file entries when uploading it again after making changes.

Having more than one file be loaded at a time would be a nice improvement too. Much like the Pandora bot does with five lines of upload files.

Tom
slow putzo
Avid Member
 
Posts: 76
Joined: November 15th, 2013, 5:55 am

Re: Change default of check box on AIML upload

Postby GeekCaveCreations » November 24th, 2013, 3:36 pm

The issue with the checkbox is another example of something being done by design, where the intent isn't necessarily the best plan. I'll look into changing the initial "value" of that checkbox in a future release of version 2. We'll be handling the way AIML files are imported just a little differently in version 3.

As for uploading multiple files at once, that's already possible in version 2. The only thing is that the AIML files need to be included as a ZIP archive. We've already got plans for allowing upload of multiple AIML files without need for a ZIP file for version 3. :)
Comforting the disturbed, and disturbing the comfortable
Chat with Morti
User avatar
GeekCaveCreations
Safe, Reliable Insanity, Since 1961
 
Posts: 1115
Joined: April 18th, 2011, 10:52 pm
Location: Nevada, USA

Re: Change default of check box on AIML upload

Postby slow putzo » November 24th, 2013, 10:56 pm

I would think it would make more sense to always purge a file and then replace it with the new file. If you wanted to "merge" new entries without removing old entries then a check box would make sense.

Because the aiml is actually loaded into a database is the only reason you even have such a choice. In other programs a file is a file is a file and it can not have several copies using the exact same name. It has always been possible to put garbage files into a bot with conflicting AIML statements which mess up the flow of conversation paths. Having it in a database is a wonderful way to avoid duplicate AIML statements and just use the last one that was read.

Think of when you "restore" a database, what if it did not first purge the database of what was in it but just dumped the new sql statements on top of what was there. Not much chance of having a clean restored database.

Replacing an AIML file is the same as restoring it in my mind. If I wanted to change just one statement by reloaded the file I would expect to use the original file to do that. Not make a new file with the originals name and have one AIML statement in it that I changed.

I have been scratching my head trying to figure out why I would ever want to NOT clear the previous file's AIML before loading new AIML on top of it.

Glad you have considered a bit of a different interface for version 3 for AIML uploads. I often will be editing two or three files working on a single conversation path. Depending on how involved the new topic conversation is I might put it all into one file until I get it working correctly and then break it apart if it makes sense.
slow putzo
Avid Member
 
Posts: 76
Joined: November 15th, 2013, 5:55 am

Re: Change default of check box on AIML upload

Postby slow putzo » February 18th, 2014, 1:52 am

For those of you who would like to always delete the previous loaded file when uploading an AIML file without having to check the box to do so, you can easily change the default setting of this box.

Find file "/admin/default.page.htm" and change line 726 to be:

Code: Select all
<input type="checkbox" id="clearDB" name="clearDB" checked/>&nbsp; &nbsp;


The unmodified line looks like this:

Code: Select all
<input type="checkbox" id="clearDB" name="clearDB"/>&nbsp; &nbsp;


You are adding the word "checked" to this line.

I prefer "checked" to be the default because I always load a full replacement of an aiml file and not an incremental version of the file.

If you make this change and for some reason want to merge your new file with the existing database version of that file simply uncheck the box before doing the upload.
slow putzo
Avid Member
 
Posts: 76
Joined: November 15th, 2013, 5:55 am

Re: Change default of check box on AIML upload

Postby slow putzo » July 8th, 2014, 3:10 am

Dave,

Thanks for changing this in the 2.4.2 version.

Tom
slow putzo
Avid Member
 
Posts: 76
Joined: November 15th, 2013, 5:55 am


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron