-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Plugins #665
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
Plugins #665
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@santinicholas is attempting to deploy a commit to the Quivr-app Team on Vercel. A member of the Team first needs to authorize it. |
|
Very interesting change! I need to think about it. The main goal would be to move towards a more micro service architecture ? Or is there anything you had in mind ? |
For now i am am thinking about placing callbacks before/after some events so the user can create simple callbacks and do stuff One of the first things i am thinking is a Telegram bot plugin that uses some hooks to send and receive text The main infostructure Might remain the Same for now, since i Will be working over a fully implemented "read only" plugin |
But yes i think maybe it could become a microservices based event chaining if you like the idea So everyone can Write its own interpreter as pluggable elements Also make multiple consecutive agents with different purposes For example use the default agent and then pass it down to a translator plugin This leads at the end to a composable framework for making agents with docs knowledge and customized actions Maybe if you like this idea i will switch over a "composable" fastapi routes, so that we can make a queue for each step of the request and pass Also files and not only text. This would allow for example a plugin that automatically uploads files whenever in a network folder there is a new document The Sky would be the limit🚀 |
Description
This PR introduces a new communication architecture for our microservices-based system, using Redis Pub/Sub. The system is designed to be extensible with a plugin system, where each plugin can act as a publisher, subscriber, or both, and interact with other services via Pub/Sub. At this stage, only the subscriber plugin has been implemented.
Related Issue: N/A (if applicable, add the issue number here)
Motivation: The main motivation for these changes is to give users the opportunity to customize the workflow and create a plugin ecosystem. The new architecture provides greater flexibility for users to extend the system with their own functionality, and the use of Redis Pub/Sub allows for more efficient and scalable communication between plugins.
System Operation
Here is a simplified explanation of how these microservices run:
Initialization: Each microservice, when started, initializes a connection with a central Redis server. The services could be either publishers, subscribers, or both, depending on their roles. If they are publishers, they are assigned a priority that dictates the order in which they can publish messages.
Publishing: If a service is a publisher, it can create messages and publish them to a specific topic. The message is sent to the Redis server, which handles distributing the message to all subscribers of that topic.
Subscribing: If a service is a subscriber, it listens to one or more topics on the Redis server. When a message is published to a topic it is subscribed to, the Redis server sends the message to the service.
Processing and Republishing: Once a service receives a message, it processes the message based on its internal logic. If the service is both a subscriber and a publisher, it may modify the message and republish it to the same topic. The modified message is then passed down to the next lower priority service in the chain for further processing. This functionality is not yet implemented.
Scaling: This architecture supports scaling by adding more instances of services. Each instance would have its own connection to the Redis server and can independently publish and/or subscribe to messages.
Plugin System: The architecture is designed to be extensible with a plugin system. Each plugin is essentially a microservice that can publish, subscribe, or both. The system allows for easy addition or removal of plugins, providing a lot of flexibility in customizing the workflow.
All services and plugins are Docker-based containers, which allows them to be written in any language that has a Redis SDK, providing even more flexibility.
Pending Features and Requests for Feedback
Checklist before requesting a review
Screenshots (if appropriate):
N/A
Please review these changes and provide feedback.