Add AdaptIntent alias

It is used so that the init argument isn't required and so that it is imported from within the mycroft module
pull/1625/head
Matthew D. Scholefield 2018-06-01 20:01:25 -05:00
parent 321807b1f1
commit dbdd67f965
2 changed files with 7 additions and 0 deletions

View File

@ -19,5 +19,6 @@ from mycroft.messagebus.message import Message
from mycroft.skills.context import adds_context, removes_context from mycroft.skills.context import adds_context, removes_context
from mycroft.skills.core import MycroftSkill, FallbackSkill, \ from mycroft.skills.core import MycroftSkill, FallbackSkill, \
intent_handler, intent_file_handler intent_handler, intent_file_handler
from mycroft.skills.intent_service import AdaptIntent
MYCROFT_ROOT_PATH = abspath(join(dirname(__file__), '..')) MYCROFT_ROOT_PATH = abspath(join(dirname(__file__), '..'))

View File

@ -15,6 +15,7 @@
import time import time
from adapt.context import ContextManagerFrame from adapt.context import ContextManagerFrame
from adapt.engine import IntentDeterminationEngine from adapt.engine import IntentDeterminationEngine
from adapt.intent import IntentBuilder
from mycroft.configuration import Configuration from mycroft.configuration import Configuration
from mycroft.messagebus.message import Message from mycroft.messagebus.message import Message
@ -24,6 +25,11 @@ from mycroft.util.parse import normalize
from mycroft.metrics import report_timing, Stopwatch from mycroft.metrics import report_timing, Stopwatch
class AdaptIntent(IntentBuilder):
def __init__(self, name=''):
super().__init__(name)
class ContextManager(object): class ContextManager(object):
""" """
ContextManager ContextManager