I am happy to announce the release of Pytector Version 0.0.9, the initial version for practical application and wider user. This release embodies my commitment to providing a easy-to-use solution for detecting prompt injection in text inputs, leveraging the latest advancements in machine learning and the transformers library.
Highlights of Version 0.0.9:
- First Production-Ready Release: After rigorous development and testing, Version 0.0.9 is the first release that is fully prepared for use in production environments, offering an advanced level of reliability and stability.
- Comprehensive Documentation: Documentation has been prepared to ensure a smooth user experience, covering installation, usage examples, and API references. Access the documentation here.
- Enhanced Model Support: This version introduces support for additional machine learning models including DeBERTa and DistilBERT, alongside optimizations for ONNX versions for improved performance and efficiency.
- Easy-to-use: Simple backend with only one API key from HuggingFace makes it easier than ever to integrate Pytector into your projects, customize settings, and detect potential prompt injections with confidence.
Installation:
To get started with Pytector Version 0.0.9, you can install it via pip:
pip install pytector==0.0.9
Or, clone the repository and install directly from the source:
git clone https://github.com/MaxMLang/pytector.git
cd pytector
pip install .
Getting Started:
To begin using Pytector, import the PromptInjectionDetector
class and initiate it with a pre-defined or custom model. For more detailed instructions, refer to my Getting Started Guide.
import pytector
# Initialize the detector
detector = pytector.PromptInjectionDetector(model_name_or_url="deberta")
# Evaluate your text input for prompt injection
is_injection, probability = detector.detect_injection("Your text input here")
print(f"Is injection: {is_injection}, Probability: {probability}")