| Crates.io | langsan |
| lib.rs | langsan |
| version | 0.0.10 |
| created_at | 2024-10-16 19:24:48.362904+00 |
| updated_at | 2024-10-19 10:20:12.886267+00 |
| description | A library for sanitizing language model input and output. |
| homepage | https://github.com/mdegans/langsan |
| repository | https://github.com/mdegans/langsan |
| max_upload_size | |
| id | 1412234 |
| size | 154,836 |
langsan is a sanitization library for language modelsOut of a desire to be first to market, many companies from OpenAI to Anthropic are releasing language models without proper input or output sanitization. This can lead to a variety of safety and security issues, including but not limited to human-invisible adversarial attacks, data leakage, and generation of harmful content.
langsan provides immutable string wrappers guaranteeing their contents are within restricted unicode ranges, generally those only officially supported by a particular language model. Almost all unicode code blocks are available as features (crates.io has a limit set at 300).