Llm-guard

Latest version: v0.3.14

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

Scan your dependencies

Page 2 of 5

0.3.7

0.3.5

Added
- [URLReachability](https://llm-guard.com/output_scanners/url_reachability/) scanner to check if the URL is reachable.
- [BanCompetitors](https://llm-guard.com/input_scanners/ban_competitors/) scanner to check if the prompt or output contains competitors' names.
- [InvisibleText](https://llm-guard.com/input_scanners/invisible_text/) scanner to check if the prompt contains invisible unicode characters (steganography attack).
- [ReadingTime](https://llm-guard.com/output_scanners/reading_time/) scanner to check if the output can be read in less than a certain amount of time.
- Example of [invisible prompt attack](tutorials/attacks/invisible_prompt.ipynb) using `InvisibleText` scanner.
- Example of [making Langchain agents secure](./tutorials/notebooks/langchain_agents.ipynb).

Fixed
- `BanSubstrings`: bug when `case_sensitive` was enabled.
- `Bias` calculation of risk score based on the threshold.

Changed
- Using `pyproject.toml` instead of `setup.py` based on the [request](https://github.com/protectai/llm-guard/issues/68).
- **[Breaking]** `Regex` scanners have a new signature. It accepts `patterns`, `is_blocked` and `match_type`.
- **[Breaking]** `BanSubstrings`: `match_type` parameter became `Enum` instead of `str`.
- **[Breaking]** `Code` scanners have a new signature. It accepts `languages` and `is_blocked` instead of 2 separate lists.
- `Toxicity`, `PromptInjection`, `Bias` and `Language` scanners support sentence match for better accuracy (will become slower).
- `BanTopics`, `FactualConsistency` and `NoRefusal`: Updated zero-shot classification model to [hMoritzLaurer/deberta-v3-base-zeroshot-v1.1-all-33](https://huggingface.co/MoritzLaurer/deberta-v3-base-zeroshot-v1.1-all-33) with different size options.
- **[Breaking]**: Using keyword arguments for better readability of the code e.g. `scanner = BanSubstrings(["a", "b", "c"], "str", False, True, False)` would raise an error.
- **[Breaking]**: API config supports configuring same scanner multiple times with different inputs.

0.3.4

0.3.3

0.3.2

0.3.1

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.