Skip to content

Commit

Permalink
fix: correct pipeline parent class (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Nov 2, 2024
1 parent caef432 commit f0935ae
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions ocp_pipeline/opm.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from ovos_bus_client.session import SessionManager
from ovos_config import Configuration
from ovos_plugin_manager.ocp import available_extractors
from ovos_plugin_manager.templates.pipeline import IntentHandlerMatch, ConfidenceMatcherPipeline
from ovos_plugin_manager.templates.pipeline import IntentHandlerMatch, ConfidenceMatcherPipeline, PipelineStageMatcher
from ovos_utils.lang import standardize_lang_tag, get_language_dir
from ovos_utils.log import LOG, deprecated, log_deprecation
from ovos_utils.messagebus import FakeBus
Expand Down Expand Up @@ -1070,12 +1070,12 @@ def match_legacy(self, utterances: List[str], lang: str, message: Message = None
return MycroftCPSLegacyPipeline(self.bus, self.config).match(utterances, lang, message)


class MycroftCPSLegacyPipeline(ConfidenceMatcherPipeline, OVOSAbstractApplication):
class MycroftCPSLegacyPipeline(PipelineStageMatcher, OVOSAbstractApplication):
def __init__(self, bus: Optional[Union[MessageBusClient, FakeBus]] = None,
config: Optional[Dict] = None):
OVOSAbstractApplication.__init__(self, bus=bus or FakeBus(),
skill_id=OCP_ID, resources_dir=f"{dirname(__file__)}")
ConfidenceMatcherPipeline.__init__(self, bus, config)
PipelineStageMatcher.__init__(self, bus, config)
self.mycroft_cps = LegacyCommonPlay(self.bus)
OCPPipelineMatcher.load_intent_files()
self.add_event("ocp:legacy_cps", self.handle_legacy_cps, is_intent=True)
Expand Down Expand Up @@ -1111,12 +1111,6 @@ def match(self, utterances: List[str], lang: str, message: Message = None) -> Op
skill_id=OCP_ID,
utterance=utterance)

def match_medium(self, utterances: List[str], lang: str, message: Message = None) -> Optional[IntentHandlerMatch]:
return None

def match_low(self, utterances: List[str], lang: str, message: Message = None) -> Optional[IntentHandlerMatch]:
return None

def handle_legacy_cps(self, message: Message):
"""intent handler for legacy CPS matches"""
utt = message.data["query"]
Expand Down

0 comments on commit f0935ae

Please sign in to comment.