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..

Repeat last response
 
 

Hello

is it possible to somehow store a given response in a variable to to have it available in the next volley, if the user asks “Could you repeat that?” for example?

I thought of something like this:

u: (~request) $$lastoutput=%lastoutput $$lastOutput 

The solution above does not work of course, so my questions are:

1. What would be the appropriate substitute for %lastoutput?
2. At which step would i create the variable $$lastOutput = %lastoutput?

 

 
  [ # 1 ]

If you have a postprocessing topic, it can retrieve all the things said that volley using ^response in a loop, store them on a global $variable, and they are ready for the next volley if you have it.

 

 
  [ # 2 ]

Amazing! Thank you so much for the quick reply. I was not sure, how the ^response-function was working so i didn’t try it the first place.
In the end i used the following rule in my postprocess topic, which works perfectly for me:

topic: ~introduction ()

u: (request
$lastOutput

topic
: ~postprocess system () 

t
: ()  
   
$lastOutput = ^response(1

As i don’t use multiple responses i works without the loop. But maybe i’ll add it in the future.

Thanks again!

 

 
  login or register to react