ડાઉનલોડ કરો આ ઓપન સોર્સ બોટ કાવ્ય કોમ્યુનિટી આવૃત્તિ અને સ્થાપિત બોટ કાવ્ય તમારા પોતાના સર્વર પર
Self, AIML, and scripting

New to AIML Scripting

દ્વારા keatmin પોસ્ટ Jan 1 2020, 3:07

Hi

I am new to AIML Scripting. I do not able to figure out why the below script is not working as it intend to be. I am trying to simulate a login dialog. After the password was keyed in, the same question of asking password is repeated. The same script is working at pandxxx platform. I am using topic and the control tags to control my context.

<?xml version="1.0" encoding="UTF-8"?>
<aiml version="2.0">
<!-- insert your AIML categories here --> <category> <pattern>MAINMENU</pattern> <template>
<reply> <text>Policies Enquiry</text> <postback>Policies Enquiry</postback> </reply>
<reply> <text>Logout</text> <postback>Logout</postback> </reply>
</template>
</category> <category>
<pattern>START</pattern>
<template> Hi, I'm EVA, your personal assistant, Let me sign you up so that this session is personalized.<split/> Can I have your UserID please?<split/> <think><set name="topic">LOGIN</set></think> </template> </category>
<topic name="LOGIN"> <category>
<pattern>*</pattern>
<template> Can I have your password as well <think><set name="username"><star/></set></think> </template> </category> <category>
<that>Can I have your password as well</that>
<pattern>*</pattern>
<template> <think><set name="password"><star/></set></think> Thanks you for the credentials, <formal><get name="username"/></formal><split/> How can I assist you with the below services ? <srai>MAINMENU</srai> <think><set name="topic"></set></think> </template> </category> </topic>
</aiml>

Can you asssit?


by admin posted Jan 1 2020, 13:40

There seems to be an issue with it not choosing the pattern * with a <that> and <topic> over the category with just the <topic>.

If you move the <that> category first it should work,

<?xml version="1.0" encoding="UTF-8"?>
<aiml version="2.0">

<category>
<pattern>MAINMENU</pattern>
<template>
<br/><button>Policies Enquiry</button> <button>Logout</button>
</template>
</category>

<category>
<pattern>START</pattern>
<template>
Hi, I'm EVA, your personal assistant, Let me sign you up so that this session is personalized.<br/>
Can I have your UserID please?<split/>
<think><set name="topic">LOGIN</set></think>
</template>
</category>

<topic name="LOGIN">

<category>
<that>Can I have your password as well</that>
<pattern>*</pattern>
<template>
<think><set name="password"><star/></set></think>
Thanks you for the credentials, <formal><get name="username"/></formal><br/>
How can I assist you with the below services ?
<srai>MAINMENU</srai>
<think><set name="topic"></set></think>
</template>
</category>

<category>
<pattern>*</pattern>
<template>
Can I have your password as well
<think><set name="username"><star/></set></think>
</template>
</category>

</topic>

</aiml>

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2583, today: 1, week: 4, month: 12

ને: 31248629
ટૅગ્સ: aiml
પોસ્ટ: Jan 1 2020, 3:07
સુધારાશે: Jan 1 2020, 13:47
જવાબો: 1
જોવાઈ: 2806, આજે: 2, સપ્તાહ: 6, મહિને: 13
0 0 0.0/5