Anonymizes personally identifiable information for Large Language Model APIs
Project description
anonLLM: Anonymize Personally Identifiable Information (PII) for Large Language Model APIs
anonLLM is a Python package designed to anonymize personally identifiable information (PII) in text data before it's sent to Language Model APIs like GPT-3. The goal is to protect user privacy by ensuring that sensitive data such as names, email addresses, and phone numbers are anonymized.
Features
Anonymize names Anonymize email addresses Anonymize phone numbers Support for multiple country-specific phone number formats Reversible anonymization (de-anonymization) Installation
To install anonLLM, run:
pip install anonLLM
Quick Start
Here's how to get started with anonLLM:
from anonLLM import OpenaiLanguageModel
## Anonymize a text
text = "My name is Alice Johnson, email: alice.johnson@example.com, phone: +1 234-567-8910."
## Anonymization is handled under the hood
llm = OpenaiLanguageModel(api_key="your_openai_api_key_here")
response = llm.generate(text)
print(response)
Contributing
We welcome contributions!
License
This project is licensed under the MIT License. See the LICENSE.md file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file anonLLM-0.1.3.tar.gz
.
File metadata
- Download URL: anonLLM-0.1.3.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54140130b2f3deffa143ba490121e4d91b2a84a1c29e0d8f711e129b67861c7e |
|
MD5 | 819ce87f836721a7c79b783508e2dc66 |
|
BLAKE2b-256 | 7d4a55165b04cd3e902dabb66691f8afce0de3b1de74dcd951272cfb74d211dc |
File details
Details for the file anonLLM-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: anonLLM-0.1.3-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 198bc884766f31d0fa4fe7c0e9aabe0e6ee6efe27f27e99df40cb1ab1eaa36a9 |
|
MD5 | 50dcdcff0ae779997929ac7f70c11b43 |
|
BLAKE2b-256 | a984dc717dfb7841702b289a924b13d3772299526770f808f0f958b217664f68 |