Skip to content

Commit

Permalink
Enums
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed May 12, 2023
1 parent 2991b7b commit 37c2eff
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ovos_plugin_manager/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class PluginTypes(str, Enum):
METADATA_TRANSFORMER = "neon.plugin.metadata"
AUDIO_TRANSFORMER = "neon.plugin.audio"
QUESTION_SOLVER = "neon.plugin.solver"
TLDR_SOLVER = "opm.solver.summarization"
ENTAILMENT_SOLVER = "opm.solver.entailment"
MULTIPLE_CHOICE_SOLVER = "opm.solver.multiple_choice"
READING_COMPREHENSION_SOLVER = "opm.solver.reading_comprehension"
COREFERENCE_SOLVER = "intentbox.coreference"
KEYWORD_EXTRACTION = "intentbox.keywords"
UTTERANCE_SEGMENTATION = "intentbox.segmentation"
Expand All @@ -62,6 +66,10 @@ class PluginConfigTypes(str, Enum):
METADATA_TRANSFORMER = "neon.plugin.metadata.config"
AUDIO_TRANSFORMER = "neon.plugin.audio.config"
QUESTION_SOLVER = "neon.plugin.solver.config"
TLDR_SOLVER = "opm.solver.summarization.config"
ENTAILMENT_SOLVER = "opm.solver.entailment.config"
MULTIPLE_CHOICE_SOLVER = "opm.solver.multiple_choice.config"
READING_COMPREHENSION_SOLVER = "opm.solver.reading_comprehension.config"
COREFERENCE_SOLVER = "intentbox.coreference.config"
KEYWORD_EXTRACTION = "intentbox.keywords.config"
UTTERANCE_SEGMENTATION = "intentbox.segmentation.config"
Expand Down Expand Up @@ -120,8 +128,8 @@ def load_plugin(plug_name, plug_type=None):
plugins = find_plugins(plug_type)
if plug_name in plugins:
return plugins[plug_name]
LOG.warning('Could not find the plugin {}.{}'.format(
plug_type or "all plugin types", plug_name))
plug_type = plug_type or "all plugin types"
LOG.warning(f'Could not find the plugin {plug_type}.{plug_name}')
return None


Expand Down

0 comments on commit 37c2eff

Please sign in to comment.