MycroftAI / mycroft-core

Mycroft Core, the Mycroft Artificial Intelligence platform.
https://mycroft.ai
Apache License 2.0
6.51k stars 1.27k forks source link

Provide AdaptIntent from mycroft.skills #2970

Closed krisgesling closed 3 years ago

krisgesling commented 3 years ago

Description

This is convenience addition for Skill developers who can now import all standard items for both Adapt and Padatious from a single level.

from mycroft.skills import MycroftSkill, intent_handler, AdaptIntent

Currently you need to have:

from mycroft.skills import MycroftSkill, intent_handler
from mycroft.skills.intent_service import AdaptIntent

How to test

Replace current imports in Hello World Skill with the above and run VK.

Contributor license agreement signed?

devops-mycroft commented 3 years ago

Voight Kampff Integration Test Succeeded (Results)

forslund commented 3 years ago

Just a note here,

I believe these can today be imported using

from mycroft import MycroftSkill, intent_handler, AdaptIntent

We might consider removing the imports from the main mycroft namespace if the thought is that skill developers should import from mycroft.skills. Which may be a quite good idea since it's a bit more expressive and unambiguous.