keiffster / program-y

Python 3.x based AIML 2.0 Chatbot interpreter, framework, related programs and knowledge files
https://keiffster.github.io/program-y/
Other
348 stars 138 forks source link

OOB tag implementation #34

Closed seghcder closed 7 years ago

seghcder commented 7 years ago

This may be an enhancement request :-) program-y\src\programy\parser\template\graph.py:

    def parse_oob_expression(self, expression, branch):
        raise ParserException("Error, oob not implemented yet!", xml_element=expression)

I was thinking to use the URL tag to display out of band information alongside the chat window, passed back from the extension call. Could be additional related info, a graph, a help document, knowledge base search results that would be too long to pull back into the chat window. If you were going to priortise tag implementation, I'd vote for this one!

If you have other thoughts on how to return info from an extension out of band via REST API back to webchat, would be great to hear! There's probably a few hacks... OOB is probably a good target though.

More info on OOB as linked from AIML2 doc OOB Tags

There's several OOB tags in the Alice2 bot AIML. ProgramAB / Superbot also has some more multi-step examples of managing an address book.

keiffster commented 7 years ago

OOB is definitely on the radar to support, in the meantime, you can pass it back in the response, trap it as part of the node and then pass it to a second extension that processes the out of bounds

In pseudo code

Call extension "What is the status of my issue" Response is "STATUS Issue is current in progress OOB " Grammar to trap is STATUS OOB star index="1" = "Issue is current in progress" star index="2" = OOB Data Pass OOB data to OOB extension

keiffster commented 7 years ago

OOB tab support added to project kanban board