ex:
User: play some music
Bot: *plays music* Oh, you like music?
User: Stop. (User is intending to stop the music)
Bot: (* response, because no rule just has the word stop as an input).
OR (with a broad "one word" input for in the rule)
User: play some music
Bot: *plays music* Oh, you like music?
User: Stop talking, you're ruining the music!
Bot: *stops music* I guess you didn't like it.
Here's my resolution for that, which seems to be working really well so far.
- Code: Select all
Rule name: |(verb)|
Input: |[only_verb=(verb)]|
Output: <mem.get only_verb> what?
Child Rule name: [object]
Input: (verb) [object]
Input: [object]
Output: <send <mem.get only_verb> <mem.get object>>
I sort of tried to make it respond contextually to partial inputs, like anyone else would.
User: Stop!
Bot: Stop what?
User: The music
Bot: <send stop the music> I guess you didn't like it...
I hope you can see what I'm getting at. Different outputs can be made with conditionals on what only_verb is (ex. "Go back to what?, "Search for what?"). You could even fill out the list of verbs much much more, so that words that aren't included in any command trigger the question, but still get the user to the "*" response. Let me know if you want me to explain any of it, give examples of other rules involved, etc. I just thought it was neat, and hope it's been helpful to someone out there.
Any advice? How do you handle partial inputs like that?


