-
Notifications
You must be signed in to change notification settings - Fork 508
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
[Feature] Pangea Cloud Plugin #794
Conversation
Hey @pangea-andrest , thanks for the PR! We will review this soon. |
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.
Hi, @pangea-andrest. Thanks for raising this PR. Things are almost good, can you please resolve the comments I have raised.
Also you should be adding the plugin handler inside plugins/index.ts
.
pangea: {
textGuard: handler
}
Other than that it's looking good, tested and verified working fine!
cc: @VisargD
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.
Can you please fix this one, rest looks good to me. Will approve after this.
Hey, @pangea-andrest. Sorry missed it. Just a small change please, I think you forget to remove the |
plugins/pangea/textGuard.ts
Outdated
if (!parameters.credentials?.domain) { | ||
throw Error(`'parameters.credentials.domain' must be set`); | ||
} | ||
|
||
if (!parameters.credentials?.apiKey) { | ||
throw Error(`'parameters.credentials.apiKey' must be set`); | ||
} |
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.
Here, can remove it pls?
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.
Sure, I'll do it. Just to confirm, I guess in this case we want to return verdict: false
, right? I mean, we do not want that an error in credentials allow malicious content to pass it through.
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 don't think so, cause there's no guardrail action happening. It's a pure usage issue, we could simply retrun verdict
as true
.
Yea, should be good to return true
.
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.
@b4s36t4 So, is it confirmed as true
? It seems that after the edit, you might want to say false
.
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.
It's ok, will be good for now.
Improve tests
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.
LGTM!
Title: Pangea Cloud Plugin
Description: (optional)
before
andafter
request hooks to call AI Guard service to process LLM inputs and outputs to analyze and redact text to avoid manipulation of the model, addition of malicious content, and other undesirable data transfers.Motivation: (optional)
With AI Guard service users could eliminate PII, sensitive data, and malicious content from ingestion pipelines, LLM prompts and responses.
Identify and redact various forms of PII or sensitive information in AI prompts, responses, and context RAG data.
Uncover and block malware submitted by users or ingested through agents or RAG file ingestion.
Remove links to malicious IP addresses, domains, and URLs embedded in prompts, responses, or data vectors.
Related Issues: (optional)