Skip to content

[Week 1 Lab 4] PII Redaction issue #120

@ChenyuanZ

Description

@ChenyuanZ

Hi Ed,

1_foundations/4_lab4.ipynb might hit PII Redaction issue if student call the llm through an internal proxy.

Symptom: Tool called: record_user_details Push: Recording interest from <PERSON> not provided with email <EMAIL_ADDRESS> and notes not provided

Solution: add PERSON and EMAIL_ADDRESS to the allow list based on the proxy setting. In my case, add these entities through extra_headers when calling LLM.

Before

response = openai.chat.completions.create(model="gpt-4o-mini", messages=messages, tools=tools)

After

response = openai.chat.completions.create(
        model="gpt-4o-mini",
        messages=messages,
        tools=tools,
        extra_headers={
            "<replace-me>": "PERSON,EMAIL_ADDRESS,URL",
        })

Best,
Chenyuan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions