AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Getting bot’s last message
 
 

Hello! grin

I’ve a question concerning AIML 2.0:
How can I get the last message (or one of the last messages) of the bot?

I know the <request>-tag to get one of the last messages of the user.

HUMAN: Hey!
BOT: Hi. What’s your name?
HUMAN: My name is Otto. How are you?
BOT: I’m fine.
HUMAN: last message

<category>  
  <
pattern>last message</pattern>  
  <
template>Your last message: <request index=“1“/></template>
</
category


BOT: Your last message: I’m Otto. How are you?


Is there a possibilty to get the bot’s answer? ...something like

HUMAN: Hey!
BOT: Hi. What’s your name?
HUMAN: My name is Otto. How are you?
BOT: I’m fine.
HUMAN: last message number one
BOT: My last message: I’m fine.

or

HUMAN: Hey!
BOT: Hi. What’s your name?
HUMAN: My name is Otto. How are you?
BOT: I’m fine.
HUMAN: last message number two
BOT: My last message: Hi. What’s your name?

 

 
  [ # 1 ]
<that index="x,1"/> 

Where x is how far back you want to go.
1= last message
2= 2nd to last message
etc

 

 
  [ # 2 ]

Okay, thanks!

I’ve found one of your posts about this topic:

Human: test
Bot: What are you testing? Not me I hope.

<that index=“1”> = What are you testing? Not me I hope.
<that index=“1,1”> = Not me I hope.
<that index=“1,2”> = What are you testing?

I just want to get the bot’s complete message. So <that index=“1”> should be a good decision. But there’s one problem: The that index tag ignores all punctuation marks and deletes the space between multiple sentences.

Human: test
Bot: What are you testing? Not me I hope.

<that index=“1”> = What are you testingNot me I hope
<that index=“1,1”> = Not me I hope
<that index=“1,2”> = What are you testing

I’m using ProgramAB. Maybe it’s a bug…?

 

 

 

 
  [ # 3 ]

It’s rather frustrating when the forum software loses a submitted post. I wrote something for you, Otto, that outlined exactly what you’ve found, but my post got lost along the way. Sorry. :(

That does, in fact, sound like a bug in Program AB. I’ll have to contact a friend of mine who uses that platform extensively to see if he has the same issue.

 

 
  [ # 4 ]

Yes, it’s frustrating. I know this issue…no problem, Dave. smile

That would be great! I hope there will be a solution.

 

 
  [ # 5 ]

I’ve tested a bit more in Program AB. I made a little mistake in one of my last posts. Here are all results as a summary.

HUMAN: test
BOT: What are you testing? Not me I hope.


Program AB:

<that index=“1”> = Not me I hope
<that index=“1,1”> = Not me I hope
<that index=“1,2”> = What are you testing
<that index=“1,*”> = Not me I hope
<that index=“1,2”> <that index=“1,1”>  = What are you testing Not me I hope


Pandorabots:

<that index=“1”> =  What are you testing? Not me I hope.
<that index=“1,1”> = Not me I hope.
<that index=“1,2”> = What are you testing?
<that index=“1,*”> = What are you testing? Not me I hope.
<that index=“1,2”> <that index=“1,1”> = What are you testing? Not me I hope.

 

 

 
  login or register to react