Proper procedure for removing and adding AIML

Help and bugs.

Proper procedure for removing and adding AIML

Postby pacothelovetaco » October 22nd, 2011, 9:52 pm

I have been using Program D for some time now and decided to try out Program O. Great work by the way. I already have a group of AIML files that I want to use. I would like to delete the current AIML that was installed by default and replace them with mine. So far, the only way I see this working is by deleting the old entries in the database, and adding mine by uploading them through the interface. Is there an easier way? I plan to be constantly changing my AIML files, so an easy process of replacing old with new would be ideal.
pacothelovetaco
Casual Member
 
Posts: 4
Joined: October 21st, 2011, 3:16 am

Re: Proper procedure for removing and adding AIML

Postby GeekCaveCreations » October 23rd, 2011, 7:14 am

Hi, Paco, and welcome! :)

At this point in time, there's no "shortcut" to rapid removal of AIML categories with Program O. If you like, I can write an addon script that would clear the old AIML categories and allow for upload of AIML files into your bot's database, but it will likely take me a few days to do so (I'm recovering from an eye injury, and have my left eye patched, making it difficult to see well). Let me know if you're interested.

[edit]
I just fired up the Admin interface, and it looks like the only thing that really needs to be done is add functionality to clear out the old AIML, so I'll look into just adding that to the main admin page. When I'm done, I'll post the updated file.
[/edit]
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: Proper procedure for removing and adding AIML

Postby GeekCaveCreations » October 23rd, 2011, 9:35 am

Well, that took less time than I had expected. :)

Instructions:

Local bot:
1.) Backup your bot's directory.
2.) Unzip the contents of the zip file to your bot's base directory, allowing it to overwrite files.
3.) Log into the Admin screen.
4.) Select "Clear AIML Database" from the left menu.
5.) Confirm deletion.
6.) Install your new AIML Files through the Admin page.
7.) Enjoy your bot! :)

Remote bot:
1.) Backup your bot's directory
2.) Unzip the upgrade file to a convenient location.
3.) Upload the following files to your server in the proper directory:
  • admin/pages/clear.php
  • admin/funcs/clear.php
  • admin/pages/inc/side_nav_bar.php
  • admin/pages/inc/styles.css (optional)

Let me know if you have questions/problems with this upgrade package.
Attachments
upgrade_clearDB.zip
Updates the Admin pages for Program O to add functionality for clearing the AIML table in the database.
(5.96 KiB) Downloaded 321 times
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: Proper procedure for removing and adding AIML

Postby pacothelovetaco » October 25th, 2011, 1:57 am

Great work. I will run it through the paces in the next few days. Expect an update soon.
pacothelovetaco
Casual Member
 
Posts: 4
Joined: October 21st, 2011, 3:16 am

Re: Proper procedure for removing and adding AIML

Postby pacothelovetaco » October 27th, 2011, 11:36 pm

The script works beautifully. It clears out all the AIML without any problems. But it's only good for deleting ALL the AIML, not individual AIML documents. For instance, I use a format similar to AAA. If I change one AIML document, I can't use the script to clear out just the tables associated with that AIML document. However I am not ungrateful. This has been helpful to start, and when I have time I'll look over what you have supplied and see if I can come up with a solution myself.

But such a feature would be a great addition to newer versions. In Program D, I like how I could remove/replace the AIML, then reboot, and start using the new AIML set.
pacothelovetaco
Casual Member
 
Posts: 4
Joined: October 21st, 2011, 3:16 am

Re: Proper procedure for removing and adding AIML

Postby GeekCaveCreations » October 28th, 2011, 4:27 am

I'll work up a new version to allow for removal of individual AIML files, but it may take some time. I'm currently upgrading my development box (Win 7 Pro from XP, new RAM, and a new SSD for the OS), and it's giving me fits, because I'm so picky about where things "belong". I should be able to work on it over the weekend. :)

The fact that Program D loads the AIML files each time on startup is both an advantage and a disadvantage. You can make rapid changes to either the AIML files themselves, or to the list of files to load, restart the program, and you're back in business pretty quickly. On the other hand, I've seen Program D take a long time to start up, if you have either a large number of AIML files, or if the files are very large. Plus, loading the files into memory each time can take up a lot of resources.

BTW, congrats on your 3rd post! No more waiting in the moderation queue! YAY!!! :D
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: Proper procedure for removing and adding AIML

Postby GeekCaveCreations » November 3rd, 2011, 5:31 am

Well, after fighting with my computer for several days more than I had wished/expected, I finally got around to "fixing" the script upgrade. This new version of the clear DB page now lists all file names stored in the database, and presents you with a choice of either removing all AIML category entries (effectively purging the AIML table), or just removing entries based on a chosen filename. There's even a choice for deleting entries that have no filename stored.

Just like last time, simply unzip this file into your bot's base directory, overwriting the files (MAKE SURE TO BACK UP THE OLD FILES, JUST IN CASE!), then log into your admin page, and select "Clear AIML Categories". then just follow the prompts.

This upgrade is a "stand-alone" upgrade, in that it doesn't require the earlier file download for it to work.

Let me know if you have any trouble with it, please. :)
Attachments
upgrade_clearAIML.zip
Adds the option to clear your bot's AIML table to the admin pages. Now clears by filename, in addition to purging the AIML table.
(3.6 KiB) Downloaded 349 times
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: Proper procedure for removing and adding AIML

Postby Fex » December 29th, 2011, 6:20 am

That sounds useful. Unfortunately, I'm getting an error message from the link -
Unable to deliver file.
Fex
Casual Member
 
Posts: 16
Joined: December 28th, 2011, 1:57 am

Re: Proper procedure for removing and adding AIML

Postby GeekCaveCreations » December 29th, 2011, 8:26 am

Fex, do you still have that error logging mod that I wrote for you in place? If so, can you post... Oh wait!. I forgot. Version 1 has two config files to deal with. 1 sec...

Ok, you know that error logging mod? Copy that same code, and place it in the file admin/index.php just before the following line:

Code: Select all
session_start();


Save the changes, backup the original file, and upload the modified file to the correct directory, and then give it a run.

This will create the file error_log.txt again, but this time in the admin folder. If you can post the contents of that file, I'll see what can be done to correct the problem.
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


Return to Bugs and Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron