Skip to content
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

Plugin System #130

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Plugin System #130

wants to merge 11 commits into from

Conversation

InCoB
Copy link
Contributor

@InCoB InCoB commented Jan 20, 2025

A system allows you to create a plugin that can be loaded without crashing the app. I added two mock plugins: Twitter and Mock Plugin. Please review. I will also rename the Twitter plugin to Mock Twitter plugin.

InCoB and others added 9 commits January 16, 2025 08:31
… injection

Why: Core application needs extensible architecture, standardized interface, reliable config, clean separation, and consistent UI integration

What: Added factory pattern, DI, manifest config, state persistence, security, UI utils, reference plugins (Twitter, Mock) and tests

How: Created PluginBase, Factory, Manager with full lifecycle, security, and error handling
…e factory injection, add dedicated state directory, improve state handling and tests
…ble/disable buttons with status display - Add real-time state updates - Implement state enforcement in text processing - Update UI with auto-refresh state display
…deps config option - Add dependencies section to manifest - Add dependency installation in factory
… - Add version comparison - Only install/update when needed - Improve logging messages
…dency - Add custom version comparison - Use pip show for version checks - Update tests to use new methods
…cy configuration - Explain version management features - Add test coverage details
…installed package versions - Add numpy, pandas, and requests - Update gradio to 5.12.0
@CLAassistant
Copy link

CLAassistant commented Jan 20, 2025

CLA assistant check
All committers have signed the CLA.

@InCoB
Copy link
Contributor Author

InCoB commented Jan 20, 2025

Plugins

We have a plugin system that allows you to add new features to the WebUI. Extend with
Enhance functionality by creating plugins - add a directory to /plugins containing your Python class (inheriting from PluginBase) and a manifest.yaml configuration file. To activate any plugin: Edit config.yaml. Plugins automatically install dependencies and integrate their UI/features into the main interface. Read more about plugins in README.md in the plugins directory. /// Something like this can be added to the Readme file. I'll continue working to understand how to integrate the main functionality and make use cases (e.g., creating custom controllers or prompts for specific use cases). But I hope it will make community to come with use cases

@warmshao
Copy link
Collaborator

Awesome! I will check it ASAP, kind of busy recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants