mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
test
This commit is contained in:
parent
59f1c694bd
commit
1e76583dbc
@ -19,15 +19,12 @@ class SpiceBot_AI():
|
|||||||
self.aiml_kernel._verboseMode = False
|
self.aiml_kernel._verboseMode = False
|
||||||
# Learn responses
|
# Learn responses
|
||||||
import sopel_modules
|
import sopel_modules
|
||||||
initial_dir = os.getcwd()
|
|
||||||
for plugin_dir in set(sopel_modules.__path__):
|
for plugin_dir in set(sopel_modules.__path__):
|
||||||
configsdir = os.path.join(plugin_dir, "SpiceBot_Configs")
|
configsdir = os.path.join(plugin_dir, "SpiceBot_Configs")
|
||||||
aimldir = os.path.join(configsdir, "aiml")
|
aimldir = os.path.join(configsdir, "aiml")
|
||||||
aimlstarter = os.path.join(aimldir, "std-startup.xml")
|
aimlstarter = os.path.join(aimldir, "std-startup.xml")
|
||||||
os.chdir(configsdir)
|
|
||||||
self.aiml_kernel.learn(aimlstarter)
|
self.aiml_kernel.learn(aimlstarter)
|
||||||
self.aiml_kernel.respond("LOAD AIML B")
|
self.aiml_kernel.respond("LOAD AIML B")
|
||||||
os.chdir(initial_dir)
|
|
||||||
|
|
||||||
def on_message(self, message):
|
def on_message(self, message):
|
||||||
aiml_response = self.aiml_kernel.respond(message)
|
aiml_response = self.aiml_kernel.respond(message)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user