Skip to content

Commit 9f2ab89

Browse files
doc
1 parent 286d6b1 commit 9f2ab89

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/guides/ORCHESTRATION_CHAT_COMPLETION.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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
165168
var result =

docs/release-notes/release_notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
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

0 commit comments

Comments
 (0)