BIAJ - Debugging the Script
Submitted by pirateguillermo on June 27, 2009 - 8:38pm


Before I twiddle too much with the response script, I want to have a way to dump it out and therefore be sure that the thing I'm typing in is the same as the thing that the chatbot is using. It also occurred to me that it could be fun to have multiple chat windows open. It would totally be possible because each ConversationWindow has its own ElizaMain.
I've changed all the print methods. The original code had these methods dumping the script to System.out; I modified them to accept a Writer. For now, the Writer is a wrapper around a ByteArrayOutputStream that I dump to the JTextArea in the new debug window, but it could just as easily be a FileOutputStream.
File:
Post new comment