anymize

Automatically anonymize sensitive data in your AI conversations for GDPR compliance and privacy protection.

v1.0.0
anymize.py
Python ยท 404 lines
21    class Valves(BaseModel):22        anymize_api_key: str = Field(23            default="",24            description="Your anymize API key (format: anymize_xxxxxxxxxxxxx)",25        )26 27        input_filter: str = Field(28            "text_anonymization",29            description="Controls how sensitive data in the input is processed before analysis",30            json_schema_extra={31                "enum": [32                    "text_anonymization",

๐Ÿ”’Anymize Filter for Open-WebUI

Automatically anonymize sensitive data in your AI conversations for GDPR compliance and privacy protection.

๐ŸŽฏWhat it does

Detects and anonymizes personally identifiable information (PII) before sending to AI models:

  • Names โ†’ [[Name-abc123]]
  • Emails โ†’ [[Email-def456]]
  • Phone numbers โ†’ [[Phone-ghi789]]
  • Addresses, SSNs, financial data and more
  • Document files โ†’ Text extraction + anonymization

๐Ÿš€Installation

1. Install Function

  1. Go to link
  2. Click "Get" or "Install" button
  3. Function will be automatically added to your Open-WebUI

2. Enable Function

  1. Toggle the function ON (blue switch)
  2. Click three dots (โ‹ฏ) โ†’ Toggle "Global" ON

โš™๏ธConfiguration

1. Get API Key

  • Sign up at anymize.ai
  • Generate API key (format: anymize_xxxxxxxxxxxxx)

2. Configure Settings

  1. Go to Admin Panel โ†’ Functions โ†’ Anymize Filter
  2. Click gear icon (โš™๏ธ)
  3. Set configuration:
SettingOptionsDescription
anymize_api_keyanymize_xxxxxYour API key (REQUIRED)
input_filtertext_anonymization (default)Anonymize text messages only
file_anonymizationAnonymize uploaded files only
text_file_anonymizationAnonymize both text messages and files
output_filteranonymized (default)Keep responses with anonymized placeholders
deanonymizedRestore original values in responses
  1. Click Save

๐Ÿ’ฌUsage

1. Enable in Chat

  1. Start new chat
  2. Toggle Anymize button ON in chat interface
  3. Send message with sensitive data and/or upload files

2. Input Filter Options

Text Only (text_anonymization)

Your input:

Hi, I'm John Smith, email: [email protected], phone: (555) 123-4567

AI sees (anonymized):

Hi, I'm [[Name-abc123]], email: [[Email-def456]], phone: [[Phone-ghi789]]

Files Only (file_anonymization)

  • Upload PDF, Word, or text files
  • Files are processed to extract text content
  • Extracted text is anonymized before sending to AI
  • Original message text remains unchanged

Both Text and Files (text_file_anonymization)

  • Your message text gets anonymized
  • Uploaded files are processed and anonymized
  • All content is combined and sent to AI

3. Output Filter Options

Anonymized Response (anonymized)

Hello [[Name-abc123]]! I can help you with your account at [[Email-def456]].

Deanonymized Response (deanonymized)

Hello John Smith! I can help you with your account at [email protected].

๐Ÿ“Supported File Types

  • PDF documents (.pdf)
  • Word documents (.doc, .docx)
  • Text files (.txt)

Files are processed to extract text content, which is then anonymized before analysis.


๐Ÿ”งTroubleshooting

ProblemSolution
"API key not configured"Set API key in Admin Panel โ†’ Functions โ†’ Gear icon
Function not workingCheck: Function enabled + Global enabled + Anymize button ON
"Anonymization failed"Verify API key, check network, try again
"File processing failed"Check file format is supported, file isn't corrupted
"Anonymization timeout"Large files may take time, wait up to 25 minutes
"Google quota exceeded"Switch to different AI model (not an anymize issue)

โœ…Quick Setup Checklist

  • Install function in Admin Panel
  • Enable function (blue toggle)
  • Enable globally (โ‹ฏ โ†’ Global)
  • Set API key in configuration
  • Choose input filter (text/files/both)
  • Choose output filter (anonymized/deanonymized)
  • Toggle Anymize button ON in chat
  • Test with personal data and/or files

๐Ÿ“žSupport

๐ŸŽ‰ Ready to chat securely with protected data and files!

0
1