QuestionQ150
VerifiedImplement generative AI and agentic solutionsYou have a configurable guardrail in a Microsoft Foundry project.
A Python application has a text blocklist named ConfidentialTerms that already contains terms to detect in user messages. Each incoming user message is stored in input_text.
You plan to moderate input_text before sending the text to a language model.
You need to analyze input_text by using the existing blocklist.
How should you complete the code?
Select
... blocklist_name = “ConfidentialTerms” client = ContentSafetyClient(endpoint, credential) request = ( text=input_text, blocklist_names=[blocklist_name], halt_on_blocklist_hit=False ) analysis_result = (request) ...
Community Discussion