Open ar-or opened 4 days ago
To ensure that your plugin in Langflow is recognized and executed, you should verify the following:
File Placement: Make sure your my_plugin.py
file is correctly placed in the services/plugins
directory. The PluginService
class is responsible for loading plugins from this directory, so the file must be in the correct location.
File Naming: Ensure that your plugin file is not named base.py
, service.py
, factory.py
, or __init__.py
, as these files are skipped during the plugin loading process [1].
Class Definition: Your plugin class should be a subclass of BasePlugin
and not be CallbackPlugin
or BasePlugin
itself. The PluginService
looks for classes that are subclasses of BasePlugin
to instantiate and register them [1].
Error Logs: Check the logs for any error messages. Langflow uses the loguru
logger to output error messages if there are issues loading a plugin. This can provide insights into what might be going wrong [1].
Python Version: Ensure compatibility with the Python version you are using. While your setup mentions Python 3.12, verify that all dependencies and the Langflow version you are using are compatible with this Python version.
If all these conditions are met and the issue persists, reviewing the logs for any specific error messages during the plugin loading process can help identify the problem.
To continue talking to Dosu, mention @dosu.
Hello friend, how are you?
The plugin concept became obsolete as Langflow evolved, and we stopped using it. To prevent others from mistakenly attempting to use the plugin service, I created this PR #4826 to remove all the code related to it.
That's actually disappointing, because there is no other way to expand langflow's global functionality without building it from source code, and even that wouldn't guarantee forward compatibility.
Could you describe how you used this feature? Maybe I can help you find other ways to achieve your goals or even brainstorm new features for Langflow.
Bug Description
Plugins in
services/plugins
are ignoredReproduction
my_plugin.py
with the content below (or in fact any content)Expected behavior
Plugin code executed
Who can help?
@italojohnny
Operating System
ubuntu docker
Langflow Version
1.1.0
Python Version
3.12
Screenshot
No response
Flow File