A powerful Dify plugin that provides comprehensive safety and access control features for your applications.
- Multiple rate limiting algorithms:
- Token Bucket Algorithm
- Fixed Window Algorithm
- Sliding Window Algorithm
- Leaky Bucket Algorithm
- Multiple Buckets Limitation
- Flexible storage backends:
- Redis Storage
- Dify Plugin Built-in Storage
- Multi-dimensional user identification:
- User ID
- Operation Type
- Custom Parameters
- Clone the repository:
git clone https://github.com/axdlee/safety-chat.git
- Install dependencies:
pip install -r requirements.txt
- Configure your environment:
cp .env.example .env
# Edit .env with your configuration
Install the Safety Chat plugin in your Dify application through the plugin marketplace.
Configure the plugin settings in your Dify application.
Configure your preferred rate limiting algorithm and parameters.
Create and manage your access control rules based on your requirements.
The plugin can be configured through the following methods:
- Environment variables
- Configuration file
- Dify plugin settings
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.
For support, please open an issue in the GitHub repository.