agents icon indicating copy to clipboard operation
agents copied to clipboard

[Week 1 Lab 4] PII Redaction issue

Open ChenyuanZ opened this issue 6 months ago • 1 comments

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

ChenyuanZ avatar Jul 11 '25 15:07 ChenyuanZ

hey @ChenyuanZ , Thank you for sharing - I've actually not worked with internal proxies that mask HTTP requests like that. Would you be willing to submit that as a PR in community_contributions, to help others that face this? Thanks much

ed-donner avatar Aug 09 '25 12:08 ed-donner