-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LLM-based PII redaction #585
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sarah Yurick <sarahyurick@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
system_prompt: str = SYSTEM_PROMPT, | ||
pii_labels: List[str] = PII_LABELS, | ||
): | ||
self.client = AsyncOpenAI(base_url=base_url, api_key=api_key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could use our existing AsyncOpenAIClient
from here, although I do not see an immediate benefit to this. It seems to just be a wrapper.
system_prompt: str = SYSTEM_PROMPT, | ||
pii_labels: List[str] = PII_LABELS, | ||
): | ||
self.client = OpenAI(base_url=base_url, api_key=api_key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could use our existing OpenAIClient
from here, although I do not see an immediate benefit to this. It seems to just be a wrapper.
pii_entities_lists = await self._gather(tasks) | ||
return pii_entities_lists | ||
|
||
async def _gather( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same _gather
function as from here.
TODO: