Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.

Conversation

@JarbasAI
Copy link
Contributor

@JarbasAI JarbasAI commented Jul 20, 2017

Add conversational support to skill system

The most recently used skills now have an opportunity to preview all
utterances before they hit the intent system.

==== Tech Notes ====
Skills get a preview in the order of activation -- most recent first --
and if they can consume the utterance or ignore it. If consumed,
processing stops. If ignored, the next most recent skill gets a shot
at it. Finally, if no skill consumes it the intent system takes over,
running as it always has.

Skills remain "active" for 5 minutes after last use.

A skill achieves this by implementing the converse() method, e.g.

def def converse(self, utterances, lang="en-us"):
    if .... :
        return True  # handled, consume utterance
    else:
        return False  # not for this skill, pass it along

@penrods
Copy link
Contributor

penrods commented Jul 22, 2017

Thank you for breaking this out! This'll be way easier to digest. I'll work to get this reviewed and ready for the next build.

@JarbasAI
Copy link
Contributor Author

i suppose we could avoid changing main, if we add listeners to core.py (handle_converse_request) and register the messages on bind(). then all skills would check if they were the target and if they were call converse method

any advantage in that approach over changing main?

  • allow extra data to be passed in message.data or message.context

@penrods penrods added the CLA: Needed Need signed CLA from https://mycroft.ai/cla label Aug 9, 2017
@forslund forslund added CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) and removed CLA: Needed Need signed CLA from https://mycroft.ai/cla labels Aug 14, 2017
jarbasai added 3 commits August 17, 2017 16:24
…converse

Conflicts:
	mycroft/skills/core.py
	mycroft/skills/intent_service.py
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 38.61% when pulling f4d0b4a on JarbasAI:patch-14 into 0dbcef7 on MycroftAI:dev.

Copy link
Contributor

@penrods penrods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@penrods penrods merged commit d661b8d into MycroftAI:dev Aug 17, 2017
@JarbasAI JarbasAI deleted the patch-14 branch August 18, 2017 17:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants