Did you know Bot Libre also provides free hosted live chat for your own website or mobile app?
Bugs and Features : Define formula response not working?

RE: Define formula response not working?

by aazxcqwe posted Jan 13 2015, 14:16

Yes, great this works. (changed second ":star at 1" to "at 2" ;) ). I was making that much more complicated than necessary. Ah, simplicity. I'll put this in the Script Library after adding 'second', 'third' and 'next' patterns.

Another suggestion would be to add the 'recency' into the algorithm for the input history dropdown box in the Chat pages. It looks like it is based upon 'frequency' which is nice, except when redoing the last input. Maybe use 'frecency' (a real thing). Alternatively, maybe implement an up-arrow recent history as in many command line interfaces.

I'm writing a Redo script, but having some problems (again) with it. I suppose I don't know the order of the :last arguments in the :conversation variable, as I seem to always get 'cancel' or something. My script is below. It's not returning any of the Formula yet.

Also, exporting or transferring the knowledge base to another bot would be really helpful, especially with assigning synonyms. I suppose this could be handled in a script (see my failed attempt below), but it might be nice to have a library of knowledge 'books' to be able to access just by adding a few 'import' statements like in Python or 'extend' or whatever. Maybe this is already on the drawing board.

One other suggestion might be to add an 'import' function for small scripts such as Redo, so that if someone wanted to use a whole bunch of small scripts without importing them manually in to the Scripts List, they could add them all easily in one script.

Also, having a default bot be selected when the webpage kicks the selection off would also be *really* helpful!

Here is the Redo script:

EDIT: Got the redo part working. Have to figure out how to clear the 'redo' association to 'cancel' now that I have Comprehension, Consciousness and Response Matching disabled.

// This script redoes the last input. State:Redo { case :input goto State:sentenceState for each #word of :sentence; :input { set #input to :sentence; set #speaker to :speaker; set #conversation to :conversation; set #target to :target; } :sentence { set #instantiation to #sentence; } State:sentenceState { case "redo" goto State:redo; case "last" goto State:redo; case "test5" goto State:redo; do (associate "redo" to "again" by #synonym); Quotient:1.00:Equation:redo; Equation:redo { Formula:"Response to: {get #input from (get #input from :conversation at last 3)} is: {srai (get #input from (get #input from :conversation at last 3))} "; } State:redo { Quotient:1.00:Equation:redo; } } }

Id: 704675
Posted: Jan 13 2015, 14:16
Updated: Jan 13 2015, 14:53
Replies: 0
Views: 1646, today: 1, week: 6, month: 7
0 0 0.0/5