-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/embeddings plugins #240
Conversation
WalkthroughThe changes enhance the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PluginManager
participant EmbeddingPlugin
User->>PluginManager: find_embeddings_plugins()
PluginManager-->>User: List of available plugins
User->>PluginManager: load_embeddings_plugin(plugin_name)
PluginManager->>EmbeddingPlugin: Instantiate plugin class
EmbeddingPlugin-->>User: Ready to use plugin
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- ovos_plugin_manager/embeddings.py (1 hunks)
- ovos_plugin_manager/templates/embeddings.py (1 hunks)
- ovos_plugin_manager/utils/init.py (2 hunks)
Additional comments not posted (13)
ovos_plugin_manager/embeddings.py (8)
5-11
: LGTM!The function correctly finds all installed embedding plugins using the
find_plugins
utility function.
14-21
: LGTM!The function correctly loads an embedding plugin using the
load_plugin
utility function.
24-30
: LGTM!The function correctly finds all installed voice embedding plugins using the
find_plugins
utility function.
33-40
: LGTM!The function correctly loads a voice embedding plugin using the
load_plugin
utility function.
43-49
: LGTM!The function correctly finds all installed face embedding plugins using the
find_plugins
utility function.
52-59
: LGTM!The function correctly loads a face embedding plugin using the
load_plugin
utility function.
62-68
: LGTM!The function correctly finds all installed text embedding plugins using the
find_plugins
utility function.
71-78
: LGTM!The function correctly loads a text embedding plugin using the
load_plugin
utility function.ovos_plugin_manager/templates/embeddings.py (3)
7-40
: LGTM!The class
EmbeddingsDB
is well-structured and correctly follows the abstract base class pattern. Thedistance
method is implemented correctly to calculate cosine distance between two embeddings.
64-100
: LGTM!The class
FaceEmbeddingsRecognizer
is well-structured and correctly uses the base class methods. Thepredict
method is implemented correctly to return the top face match based on the threshold.
103-149
: LGTM!The class
VoiceEmbeddingsRecognizer
is well-structured and correctly uses the base class methods. Thepredict
method is implemented correctly to return the top voice match based on the threshold.ovos_plugin_manager/utils/__init__.py (2)
25-28
: LGTM!The new constants for various embedding types are appropriately added to the
PluginTypes
class and follow the existing pattern.
66-69
: LGTM!The new constants for various embedding configuration types are appropriately added to the
PluginConfigTypes
class and follow the existing pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- ovos_plugin_manager/embeddings.py (1 hunks)
- ovos_plugin_manager/templates/embeddings.py (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- ovos_plugin_manager/embeddings.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- ovos_plugin_manager/templates/embeddings.py (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- ovos_plugin_manager/templates/embeddings.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- ovos_plugin_manager/embeddings.py (1 hunks)
- ovos_plugin_manager/templates/embeddings.py (1 hunks)
- ovos_plugin_manager/utils/init.py (2 hunks)
Files skipped from review as they are similar to previous changes (2)
- ovos_plugin_manager/embeddings.py
- ovos_plugin_manager/templates/embeddings.py
Additional comments not posted (2)
ovos_plugin_manager/utils/__init__.py (2)
25-28
: LGTM! New constants for embeddings are correctly added.The new constants for
EMBEDDINGS
,FACE_EMBEDDINGS
,VOICE_EMBEDDINGS
, andTEXT_EMBEDDINGS
follow the existing pattern and are correctly defined.
66-69
: LGTM! New constants for embeddings configurations are correctly added.The new constants for
EMBEDDINGS
,FACE_EMBEDDINGS
,VOICE_EMBEDDINGS
, andTEXT_EMBEDDINGS
configurations follow the existing pattern and are correctly defined.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #240 +/- ##
=====================================
Coverage ? 0.00%
=====================================
Files ? 60
Lines ? 4670
Branches ? 0
=====================================
Hits ? 0
Misses ? 4670
Partials ? 0 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- ovos_plugin_manager/templates/embeddings.py (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- ovos_plugin_manager/templates/embeddings.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- ovos_plugin_manager/templates/embeddings.py (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- ovos_plugin_manager/templates/embeddings.py
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
Summary by CodeRabbit
New Features
Bug Fixes