[GH-ISSUE #11888] feat: Filter functions that are applied when writing to the database #87130

Closed
opened 2026-05-15 11:29:54 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @GeorgelPreput on GitHub (Mar 19, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11888

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

I would want the full answer from the LLM presented to me when it is streamed from the LLM, but would like that the database only retains data that has been anonymized.

Desired Solution you'd like

I'd like a solution similar to the existing filter functions, only that the filter is applied upon writing and reading from the database.

Application of a destructive anonymization / redaction filter upon the text would, of course, mean that upon the reload of a chat, the PII data would appear anonymized to the user as well. Alternatively, a key might be pulled from an external source to encrypt and decrypt the data as it enters / leaves the database.

Having filter functions applied to the database read / write operations would open up other use cases as well, just out of my current scope.

Alternatives Considered

An alternative that I've seen floated would be to have an "anonymize" Action Function that the user would press. This is not robust, as users would simply forget to press it.

Another more convoluted alternative is to deploy Open WebUI with Postgres, also deploy a pipelining solution (currently looking at n8n), along with an anonymization engine like Presidio, and running a n8n pipeline that anonymizes records asynchronously in the background on a regular basis. I consider this an unfortunately convoluted work-around, but it does work.

Additional Context

No response

Originally created by @GeorgelPreput on GitHub (Mar 19, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/11888 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description I would want the full answer from the LLM presented to me when it is streamed from the LLM, but would like that the database only retains data that has been anonymized. ### Desired Solution you'd like I'd like a solution similar to the existing filter functions, only that the filter is applied upon writing and reading from the database. Application of a destructive anonymization / redaction filter upon the text would, of course, mean that upon the reload of a chat, the PII data would appear anonymized to the user as well. Alternatively, a key might be pulled from an external source to encrypt and decrypt the data as it enters / leaves the database. Having filter functions applied to the database read / write operations would open up other use cases as well, just out of my current scope. ### Alternatives Considered An alternative that I've seen floated would be to have an "anonymize" Action Function that the user would press. This is not robust, as users would simply forget to press it. Another more convoluted alternative is to deploy Open WebUI with Postgres, also deploy a pipelining solution (currently looking at n8n), along with an anonymization engine like [Presidio](https://github.com/microsoft/presidio/blob/main/docs/installation.md#using-docker), and running a n8n pipeline that anonymizes records asynchronously in the background on a regular basis. I consider this an unfortunately convoluted work-around, but it does work. ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#87130