[Week 1 Lab 4] PII Redaction issue
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
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