Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pysamples
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-11-18 03:40:28 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-11-18 03:40:28 (GMT)
commit4a5ef51bb341bc1f81f107b5475d3bf32d312127 (patch)
tree909c02d6dcd7339587f4e632c256b725ebf82f5f /pysamples
parentcc9a250cbc116b05afe28b4f5f53b26d646bbe5c (diff)
save aiml status between runs
Diffstat (limited to 'pysamples')
-rw-r--r--pysamples/brain.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pysamples/brain.py b/pysamples/brain.py
index 7ff50c2..5a2c0c4 100644
--- a/pysamples/brain.py
+++ b/pysamples/brain.py
@@ -96,7 +96,8 @@ Close other activities and try once more."
return kernel
kernel = None
- kernel = brain_load(kernel, get_default_voice())
- response_text = brain_respond(kernel, text)
+ if not hasattr(tw, 'aiml_kernel'):
+ tw.aiml_kernel = brain_load(tw, get_default_voice())
+ response_text = brain_respond(tw.aiml_kernel, text)
tw.lc.heap.append(response_text)
return