Skip to content

feat(modelarmor): Added code samples for screening user prompt, model response and a PDF file #10065

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

tirthrajsinh-zala-crest
Copy link

@tirthrajsinh-zala-crest tirthrajsinh-zala-crest commented Apr 10, 2025

Description

Created samples for user prompt and model response sanitation using model armor APIs.

Checklist

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration
  • Appropriate changes to README are included in PR
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • Tests pass: mvn clean verify required
  • Lint passes: mvn -P lint checkstyle:check required
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

Copy link

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Apr 10, 2025
@tirthrajsinh-zala-crest tirthrajsinh-zala-crest changed the title Added Modelarmor sanitization code snippets feat(modelarmor) : Added Modelarmor sanitization code snippets Apr 10, 2025
@tirthrajsinh-zala-crest tirthrajsinh-zala-crest changed the title feat(modelarmor) : Added Modelarmor sanitization code snippets feat(modelarmor) : added modelarmor sanitization code snippets Apr 10, 2025
@telpirion telpirion self-assigned this Apr 11, 2025
Copy link
Contributor

@telpirion telpirion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has the same global issues as #10068 .

See internal discussion about content.

@telpirion telpirion added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Apr 11, 2025
@harshnasitcrest
Copy link

This PR has the same global issues as #10068 .

See internal discussion about content.

@telpirion Thanks for your review! All global issues have been resolved in this PR along with sensitive content replaced based on GoogleCloudPlatform/python-docs-samples#13305

I will include additional tests, along with a sample of the Advanced SDP template, in a separate PR. This will prevent the increased diff from making it difficult for review.

@tirthrajsinh-zala-crest tirthrajsinh-zala-crest changed the title feat(modelarmor) : added modelarmor sanitization code snippets feat(modelarmor): Added code samples for screening user prompt, model response and a PDF file Apr 17, 2025
@tirthrajsinh-zala-crest tirthrajsinh-zala-crest marked this pull request as ready for review April 17, 2025 15:43
Copy link

snippet-bot bot commented Apr 17, 2025

Here is the summary of changes.

You are about to add 4 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@gptSanyam gptSanyam added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Apr 18, 2025
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Indicates a pull request not ready for merge, due to either quality or timing. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants