Skip to content

Commit 0ebe06d

Browse files
author
Paweł Kędzia
committed
Enable GenAI anonymization by default, add “no_anno” option, and include anonymize flag in payload
1 parent 0aecc03 commit 0ebe06d

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

llm_router_web/web/anonymizer/routes.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,13 @@ def chat_message():
124124
chat="❌ GenAI selected but no model provided. Please select a model.",
125125
)
126126

127+
print("algorithm=", algorithm)
128+
print("algorithm=", algorithm)
129+
print("algorithm=", algorithm)
130+
127131
payload = {
128132
"stream": False,
133+
"anonymize": algorithm != "no_anno",
129134
"model": model_name or "google/gemma-3-12b-it",
130135
"messages": [{"role": "user", "content": user_msg}],
131136
}

llm_router_web/web/anonymizer/templates/chat.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ <h2>💬 LLM‑Router Chat</h2>
2525
<option value="fast" selected>Fast Masking</option>
2626
<option value="genai">GenAI Anonymisation</option>
2727
<option value="priv">Priv Masker</option>
28+
<option value="no_anno">Dont anonymize</option>
2829
</select>
2930

3031
<!-- New: model selector – populated from our own `/anonymize/models` endpoint -->

run-rest-api-gunicorn.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export LLM_ROUTER_REDIS_PORT=${LLM_ROUTER_REDIS_PORT:-6379}
4949
# ==================================================================================
5050
# Data protection (additional endpoints will be available)
5151
export LLM_ROUTER_FORCE_ANONYMISATION=${LLM_ROUTER_FORCE_ANONYMISATION:-0}
52-
export LLM_ROUTER_ENABLE_GENAI_ANONYMIZE_TEXT_EP=${LLM_ROUTER_ENABLE_GENAI_ANONYMIZE_TEXT_EP:-0}
52+
export LLM_ROUTER_ENABLE_GENAI_ANONYMIZE_TEXT_EP=${LLM_ROUTER_ENABLE_GENAI_ANONYMIZE_TEXT_EP:-1}
5353

5454

5555
# ==================================================================================

0 commit comments

Comments
 (0)