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

how do i repeat a response?
 
 

How do I allow a response to be repeated?

I have looked at ^noerase() ^keep() ^repeat.  I need a working example.

 

 
  [ # 1 ]

Depends on your intent. 

^repeat()  and the REPEAT topic control flag, allow an output to be issued even if it was issued recently.
^keep() prevents a top level rule from being erased when used and the KEEP topic control flag prevents responders from being erased when used.

topic: ~test keep repeat(test)
u: (test) this can be output any number of times when test is said

topic: ~test1 (test1)
u: (test1) ^repeat() this is test1
u: (test1) ^repeat() this is test1
The above would allow “this is test1” to be issued in succession, but it would come from different rules.

topic: ~test2 (test2)
u: (test2) ^keep() ^repeat() This is test2 issuable any number of times

 

 
  [ # 2 ]

where are you seeing noerase in documentation?

 

 
  [ # 3 ]

thanks for the reply… trying it now.

noerase was in a google search, not in docs

 

 
  [ # 4 ]

right. was OLD form, renamed to ^keep() a while back

 

 
  [ # 5 ]

Quick follow up to this.

If the system monitors itself, and is able to repeat itself after 20 outputs, how can I disable a gambit after its first use, so it isn’t reused, even >20 volleys later?

Thanks in advance, for the quick tip!

 

 
  [ # 6 ]

the question is better asked how do you repeat one, since Gambits automatically disable themselves after use

 

 
  [ # 7 ]

Ah perhaps my issue is I am using KEEP as a topic flag.

If I want all my rules in a topic file to have KEEP applied to them, except the gambits, what do you recommend is the best approach?

 

 
  [ # 8 ]

do what you did.  KEEP as a topic flag has no effect on a gambit.  ^keep() on a gambit does.

 

 
  [ # 9 ]

hmm. I am noticing that after ~20 volleys, if I input a keyword that triggers this topic, the gambit that has already fired (and has no ^keep() on it) will fire again.

Any thoughts on what else I might be missing here?

 

 
  [ # 10 ]

Oh jeez, Bruce. I’ve messed up here. I completely forgot I had modified that gambit into a u: responder. Sorry for the confusion!

My question is, then, how do I disable a single rule after it fires once, when the rest of the topic has a KEEP flag on it?

Sorry again for the confusion!

 

 
  [ # 11 ]

AH… You have finally named the implied problem you were having, rather than requesting how to do things.  But in the absence of almost any data, I don’t know, since your experience is contrary to chatscript design. Can you show me the code of the topic that has this issue?  Ultimately, I probably need you to do :trace all and then repeat your problem and email me the log.

 

 
  [ # 12 ]

Here’s what the topic looks like:

topic: ~femaleromance keep (relationship love ~female_role_romantic)

u: (~female_romantic_subject) Is there anything troubling you about your relationship right now?
  a: (~yesanswer) $relationshipissue = yes ^gambit(~)

My issue is that >20 volleys later, if the user inputs anything to do with their girlfriend (part of the ~female_romantic_subject concept I have created), this u: responder will fire again. I’d like to somehow “kill” the rule once it’s been used once.

Let me know if you’d still prefer me to send a copy of the trace.

Thanks Bruce!

 

 
  [ # 13 ]

RIght now, of course, the rule is saved because of the keep flag on the topic. Assuming you want that for most responders BUT want this ONE rule to not follow that, then add this to the rule:
u: (~female_romantic_subject) ^disable(RULE ~) Is there anything troubling you about your relationship right now?

^disable(RULE is the inverse of ^keep()

 

 
  [ # 14 ]

Ah! Wonderful. I was trying this but failed to use “~” in the call. Thanks Bruce. I really appreciate your help here.

Things around coming together on my first chat bot, and I can’t tell you how thrilled I am to be learning and using this technology you have created. It’s fascinating. Thank you, again.

 

 
  login or register to react