[pandorabots-general] conditional based on a predicate
alison
ali.carver at gmail.com
Sun Aug 13 04:40:13 PDT 2006
G'day Ron,
I've been doing this with a condition tag - it's a little bit tedious but it
works; for example;
<pattern> What is my name? </pattern>
<template>
<condition name="name">
<li value="*"> Your name is <get name="name"/>.</li>
<li> You haven't told me. What is your name? </li>
</condition>
</template>
... what that does is checks if it has a value, and does one thing if it
matches the wildcard character ( * ) and something else if it doesn't - i.e.
it's empty.
if you have the default return for "get"s set to "" then this will work;
otherwise the second <li> statement needs to look like this...
<li value="default return statement"> not sure </li>
usually this will be "OM".
hope that helps / all the best...
Alison
-----Original Message-----
> From:
> pandorabots-general-bounces+brian_hoecht=msn.com at list.pandorabots
> com
> [mailto:pandorabots-general-bounces+brian_hoecht=msn.com at list.pan
> dorabots.com] On Behalf Of Ron Ingram
> Sent: Saturday, August 12, 2006 1:28 PM
> To: pandorabots-general at list.pandorabots.com
> Subject: [pandorabots-general] conditional based on a predicate
>
> I find with long conversations my bot often asks a few
> questions that it should already "know" the answer
> too, for example asking "how old are you" when the
> client indicated their age only a few questions prior.
>
> Does anybody have an example of a conditional
> statement in aiml to turn a response on or off based
> on whether a client predicate has a value or not?
>
> For example if the bot already has a client age
> predicate with a value of 38, the bot would respond
> with "when is your birthday" instead of "how old are
> you", unless it already had a client predicate value
> for "birthday" in which case it would respond with,
> "what is new with you". But if the value for either
> age or birthday was empty then the bot would go ahead
> and ask "how old are you" or "when is your birthday".
>
> I think this would greatly enrich bot "intelligence",
> any help very much appreciated.
>
> thx,
>
> Ron
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.pandorabots.com/pipermail/pandorabots-general/attachments/20060813/77296941/attachment.html
More information about the pandorabots-general
mailing list