File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
orchestration/src/main/java/com/sap/ai/sdk/orchestration Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 88import lombok .Setter ;
99import 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
1337public class LlamaGuardFilter implements ContentFilter {
You can’t perform that action at this time.
0 commit comments