Switching users


Been doing lots of tweaking while stuck at home but I figured this one might be worth sharing

I found that CALL ME * voice command would change the name in the existing profile before switching to the new/different one. I did lots of searching and did not find a similar commmand(Icould have missed it there is a lot to go through)

I didn't really want to edit the existing file as the aiml directory makes it easy to add your own. So I wrote this and put it in a file called switchuser.aiml

It creates the Predicate "nextname" in the current profile(mostly for testing but figured I'd leave it there) then switches to the newly selected users profile.



<category><pattern>SWITCH USER TO *</pattern>
<template><srai>RANDOM INTRO</srai>
        <set name="nextname"><formal><star/></formal></set>
            <param>chatBot.setUsername(u"<get name="nextname"/>")</param>