File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -158,8 +158,11 @@ var filterLoose = new AzureContentFilter()
158158 .sexual(ALLOW_SAFE_LOW_MEDIUM )
159159 .violence(ALLOW_SAFE_LOW_MEDIUM );
160160
161+ // choose Llama Guard filter or/and Azure filter
162+ var llamaGuardFilter = new LlamaGuardFilter (). config(LlamaGuard38b . create(). selfHarm(true ));
163+
161164// changing the input to filterLoose will allow the message to pass
162- var configWithFilter = config. withInputFiltering(filterStrict). withOutputFiltering(filterStrict);
165+ var configWithFilter = config. withInputFiltering(filterStrict). withOutputFiltering(filterStrict, llamaGuardFilter );
163166
164167// this fails with Bad Request because the strict filter prohibits the input message
165168var result =
Original file line number Diff line number Diff line change 2020 - Images are now supported as input in newly introduced ` MultiChatMessage ` .
2121 - ` MultiChatMessage ` also allows for multiple content items (text or image) in one object.
2222 - Grounding input can be masked with ` DPIConfig ` .
23- - LLama Guard can now be used for content filtering.
23+ - [ LLama Guard can now be used for content filtering.] ( ../guides/ORCHESTRATION_CHAT_COMPLETION.md#chat-completion-filter )
2424 - Support for tool calling and response format
2525
2626### 📈 Improvements
You can’t perform that action at this time.
0 commit comments