Skip to content

How to use with uv and how to create encoding/decoding pipeline #20

Description

@mmbetz

I tested the privacy cleaner by OpenAI:

Get it via git clone https://github.com/openai/privacy-filter.git

Install via cd privacy-filter and then via uv:

uv venv
source .venv/bin/activate
uv pip install -e .

On Mac M-series, you can use MPS GPU, but need to switch off Triton first.

So, you can use e.g. OPF_MOE_TRITON=0 uv run python -m opf --device mps "Max Mustermann wohnt in der Hauptstraße 12, 10115 Berlin. Seine E-Mail ist max@max.de und seine Faxnummer ist 030 123456. Konto ist 4221740036751929"

Which gives you <PRIVATE_PERSON> wohnt in der <PRIVATE_ADDRESS>. Seine E-Mail ist <PRIVATE_EMAIL> und seine Faxnummer ist <PRIVATE_PHONE>. Konto ist <ACCOUNT_NUMBER>.

You can build encode/decode pipelines (e.g. for encoding before sending to LLM and decode the answer) with using the --format json option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions