Skip to content

Commit 18f5e0b

Browse files
javadoc
1 parent f6f2d8f commit 18f5e0b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

orchestration/src/main/java/com/sap/ai/sdk/orchestration/LlamaGuardFilter.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,30 @@
88
import lombok.Setter;
99
import lombok.experimental.Accessors;
1010

11+
/**
12+
* A content filter wrapping Llama Guard filter config.
13+
*
14+
* <p>This class allows setting filters for different content categories such as hate, self-harm,
15+
* sexual, and violence.
16+
*
17+
* <p>Example usage:
18+
*
19+
* <pre>{@code
20+
* // values not set are disabled by default
21+
* val config =
22+
* LlamaGuard38b.create()
23+
* .violentCrimes(true)
24+
* .selfHarm(true);
25+
* val filterConfig = new LlamaGuardFilter().config(config);
26+
* }</pre>
27+
*
28+
* @link <a
29+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP AI
30+
* Core: Orchestration - Input Filtering</a>
31+
* @link <a
32+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/output-filtering">SAP
33+
* AI Core: Orchestration - Output Filtering</a>
34+
*/
1135
@Accessors(fluent = true)
1236
@Setter
1337
public class LlamaGuardFilter implements ContentFilter {

0 commit comments

Comments
 (0)