Skip to content

Commit

Permalink
feat:pipeline plugin factory
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Oct 16, 2024
1 parent 9210881 commit f2619b0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ovos_plugin_manager/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ def load_pipeline_plugin(module_name: str) -> type(PipelinePlugin):
class OVOSPipelineFactory:
_CACHE = {}

@staticmethod
def get_installed_pipelines() -> List[str]:
pipelines = []
for plug_id, clazz in find_pipeline_plugins().items():
if issubclass(clazz, ConfidenceMatcherPipeline):
pipelines.append(f"{plug_id}-low")
pipelines.append(f"{plug_id}-medium")
pipelines.append(f"{plug_id}-high")
else:
pipelines.append(plug_id)
return pipelines

@staticmethod
def get_pipeline_classes(pipeline: Optional[List[str]] = None) -> List[Tuple[str, type(PipelinePlugin)]]:

Expand Down

0 comments on commit f2619b0

Please sign in to comment.