templates[minor]: Add rag google sensitive data protection template (#13921)

This is a template demonstrating how to utilize Google Sensitive Data
Protection in conjunction with ChatVertexAI(). Tagging you @efriis as
you reviewed my last template. :) Thanks!

Proof of successful execution: 

![image](https://github.com/langchain-ai/langchain/assets/82172964/e4d678aa-85c8-482b-b09d-81fe7e912dd4)

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
juan-calvo-datatonic
2023-11-29 00:15:58 +01:00
committed by GitHub
parent 8b9dc5e6d3
commit 6137894008
9 changed files with 2487 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
from rag_google_cloud_sensitive_data_protection.chain import chain
if __name__ == "__main__":
query = {
"question": "Good morning. My name is Captain Blackbeard. My phone number "
"is 555-555-5555. And my email is lovely.pirate@gmail.com. Have a nice day.",
"chat_history": [],
}
print(chain.invoke(query))