Pytector

Latest version: v0.0.12

Safety actively analyzes 688215 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.0.12

Or, clone the repository and install directly from the source:

bash
git clone https://github.com/MaxMLang/pytector.git
cd pytector
pip install .


---

📝 Getting Started

Here’s a quick example to get started with Pytector:

python
import pytector

Initialize the detector with the DeBERTa model
detector = pytector.PromptInjectionDetector(model_name_or_url="deberta")

Check if a prompt contains an injection
is_injection, probability = detector.detect_injection("Test your text input here")
print(f"Is injection: {is_injection}, Probability: {probability}")


For more usage instructions and examples, refer to the [Getting Started Guide](https://github.com/MaxMLang/pytector/blob/main/docs/PromptInjectionDetector.md).

---

⚙️ Key Features

- **Multiple Model Support**: Flexibility to choose the model that best fits your needs.
- **Groq Content Safety Check**: Optional integration with Groq’s Llama Guard for comprehensive hazard detection, including categories like privacy violations, self-harm, and intellectual property concerns.
- **Customizable Thresholds**: Set custom probability thresholds to fine-tune detection sensitivity.

---

Known Issues

- **Groq API Key Requirement**: To use Groq’s Llama Guard feature, an API key is required.
- **Prototype Phase**: While this release is production-ready, it’s still in early stages. Future improvements and enhancements are planned based on user feedback.

---

Feedback and Contributions

Your feedback is invaluable! If you encounter any issues or have suggestions, please submit them via GitHub Issues. Contributions are welcome; see our [Contributing Guide](https://github.com/MaxMLang/pytector/blob/main/contributing.md) for more information.

---

0.0.9

Or, clone the repository and install directly from the source:
bash
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](https://github.com/MaxMLang/pytector/blob/main/docs/PromptInjectionDetector.md).

python
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}")

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.