-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
example usage: https://github.com/TigreGotico/ovos-face-embeddings-plugin https://github.com/TigreGotico/ovos-voice-embeddings-plugin https://github.com/TigreGotico/ovos-chromadb-embeddings-plugin https://github.com/TigreGotico/ovos-gguf-embeddings-plugin
- Loading branch information
Showing
3 changed files
with
442 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
from ovos_plugin_manager.templates.embeddings import EmbeddingsDB, TextEmbeddingsStore, FaceEmbeddingsStore, VoiceEmbeddingsStore | ||
from ovos_plugin_manager.utils import PluginTypes | ||
|
||
|
||
def find_embeddings_plugins() -> dict: | ||
""" | ||
Find all installed plugins | ||
@return: dict plugin names to entrypoints | ||
""" | ||
from ovos_plugin_manager.utils import find_plugins | ||
return find_plugins(PluginTypes.EMBEDDINGS) | ||
|
||
|
||
def load_embeddings_plugin(module_name: str) -> type(EmbeddingsDB): | ||
""" | ||
Get an uninstantiated class for the requested module_name | ||
@param module_name: Plugin entrypoint name to load | ||
@return: Uninstantiated class | ||
""" | ||
from ovos_plugin_manager.utils import load_plugin | ||
return load_plugin(module_name, PluginTypes.EMBEDDINGS) | ||
|
||
|
||
def find_voice_embeddings_plugins() -> dict: | ||
""" | ||
Find all installed plugins | ||
@return: dict plugin names to entrypoints | ||
""" | ||
from ovos_plugin_manager.utils import find_plugins | ||
return find_plugins(PluginTypes.VOICE_EMBEDDINGS) | ||
|
||
|
||
def load_voice_embeddings_plugin(module_name: str) -> type(VoiceEmbeddingsStore): | ||
""" | ||
Get an uninstantiated class for the requested module_name | ||
@param module_name: Plugin entrypoint name to load | ||
@return: Uninstantiated class | ||
""" | ||
from ovos_plugin_manager.utils import load_plugin | ||
return load_plugin(module_name, PluginTypes.VOICE_EMBEDDINGS) | ||
|
||
|
||
def find_face_embeddings_plugins() -> dict: | ||
""" | ||
Find all installed plugins | ||
@return: dict plugin names to entrypoints | ||
""" | ||
from ovos_plugin_manager.utils import find_plugins | ||
return find_plugins(PluginTypes.FACE_EMBEDDINGS) | ||
|
||
|
||
def load_face_embeddings_plugin(module_name: str) -> type(FaceEmbeddingsStore): | ||
""" | ||
Get an uninstantiated class for the requested module_name | ||
@param module_name: Plugin entrypoint name to load | ||
@return: Uninstantiated class | ||
""" | ||
from ovos_plugin_manager.utils import load_plugin | ||
return load_plugin(module_name, PluginTypes.FACE_EMBEDDINGS) | ||
|
||
|
||
def find_text_embeddings_plugins() -> dict: | ||
""" | ||
Find all installed plugins | ||
@return: dict plugin names to entrypoints | ||
""" | ||
from ovos_plugin_manager.utils import find_plugins | ||
return find_plugins(PluginTypes.TEXT_EMBEDDINGS) | ||
|
||
|
||
def load_text_embeddings_plugin(module_name: str) -> type(TextEmbeddingsStore): | ||
""" | ||
Get an uninstantiated class for the requested module_name | ||
@param module_name: Plugin entrypoint name to load | ||
@return: Uninstantiated class | ||
""" | ||
from ovos_plugin_manager.utils import load_plugin | ||
return load_plugin(module_name, PluginTypes.TEXT_EMBEDDINGS) |
Oops, something went wrong.