Skip to content

Commit b1392a3

Browse files
docs
1 parent df53803 commit b1392a3

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

docs/guides/ORCHESTRATION_CHAT_COMPLETION.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [Chat Completion Filter](#chat-completion-filter)
1212
- [Data Masking](#data-masking)
1313
- [Grounding](#grounding)
14+
- [Mask Grounding](#mask-grounding)
1415
- [Stream chat completion](#stream-chat-completion)
1516
- [Add images and multiple text inputs to a message](#add-images-and-multiple-text-inputs-to-a-message)
1617
- [Set a Response Format](#set-a-response-format)
@@ -253,6 +254,23 @@ In this example, the AI model is provided with additional context in the form of
253254

254255
Please find [an example in our Spring Boot application](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OrchestrationService.java).
255256

257+
### Mask Grounding
258+
259+
You can also mask both the grounding information and the prompt message:
260+
261+
```java
262+
var maskingConfig =
263+
DpiMasking.anonymization()
264+
.withEntities(DPIEntities.SENSITIVE_DATA)
265+
.withMaskGroundingEnabled()
266+
.withAllowList(List.of("SAP", "Joule"));
267+
var maskedGroundingConfig = groundingConfig.withMaskingConfig(maskingConfig);
268+
269+
var result = client.chatCompletion(prompt, maskedGroundingConfig);
270+
```
271+
272+
Please find [an example in our Spring Boot application](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OrchestrationService.java).
273+
256274
## Stream chat completion
257275

258276
It's possible to pass a stream of chat completion delta elements, e.g. from the application backend to the frontend in real-time.

docs/release-notes/release_notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
### ✨ New Functionality
1414

1515
- [Orchestration] [Prompt templates can be consumed from registry.](https://github.com/SAP/ai-sdk-java/tree/main/docs/guides/ORCHESTRATION_CHAT_COMPLETION.md#Chat-completion-with-Templates)
16+
- [Orchestration] [Masking is now available on grounding.](https://github.com/SAP/ai-sdk-java/tree/main/docs/guides/ORCHESTRATION_CHAT_COMPLETION.md#mask-grounding)
1617

1718
### 📈 Improvements
1819

0 commit comments

Comments
 (0)