Skip to content

Commit a652d4e

Browse files
authored
Add links to orchestration documentation in javadocs (#213)
* Add links to orchestration doc in javadocs. * Formating javadocs. * Add links to sample code. --------- Co-authored-by: Jonas Israel <[email protected]>
1 parent 6e9d558 commit a652d4e

File tree

6 files changed

+77
-3
lines changed

6 files changed

+77
-3
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
* .hate(AzureFilterThreshold.ALLOW_SAFE)
2222
* .selfHarm(AzureFilterThreshold.ALLOW_SAFE_LOW);
2323
* }</pre>
24+
*
25+
* @link <a
26+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP AI
27+
* Core: Orchestration - Input Filtering</a>
28+
* @link <a
29+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/output-filtering">SAP
30+
* AI Core: Orchestration - Output Filtering</a>
2431
*/
2532
@Setter
2633
@NoArgsConstructor

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
/**
77
* Interface representing convenience wrappers of serializable content filter that defines
88
* thresholds for different content categories.
9+
*
10+
* @link <a
11+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP AI
12+
* Core: Orchestration - Input Filtering</a>
13+
* @link <a
14+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/output-filtering">SAP
15+
* AI Core: Orchestration - Output Filtering</a>
916
*/
1017
public interface ContentFilter {
1118

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
/**
2222
* SAP Data Privacy Integration (DPI) can mask personally identifiable information using either
2323
* anonymization or pseudonymization.
24+
*
25+
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP
26+
* AI Core: Orchestration - Data Masking</a>
2427
*/
2528
@Value
2629
@Getter(AccessLevel.PACKAGE)

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
import com.sap.ai.sdk.orchestration.model.MaskingProviderConfig;
44
import javax.annotation.Nonnull;
55

6-
/** Interface for masking configurations. */
6+
/**
7+
* Interface for masking configurations.
8+
*
9+
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP
10+
* AI Core: Orchestration - Data Masking</a>
11+
*/
712
public interface MaskingProvider {
813

914
/**

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

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
* <li>Input Content Filtering (Optional)
3535
* <li>Output Content Filtering (Optional)
3636
* </ul>
37+
*
38+
* @link <a
39+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/orchestration-workflow">
40+
* SAP AI Core: Orchestration - Orchestration Workflow</a>
3741
*/
3842
@Value
3943
@With
@@ -42,24 +46,49 @@
4246
public class OrchestrationModuleConfig {
4347
/**
4448
* The configured language model settings. This configuration is required when executing requests.
49+
*
50+
* @link <a
51+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/model-configuration">
52+
* SAP AI Core: Orchestration - Model Configuration</a>
4553
*/
4654
@Nullable LLMModuleConfig llmConfig;
4755

4856
/**
4957
* A template to be populated with input parameters. Upon request execution, this template will be
5058
* enhanced with any messages and parameter values from {@link OrchestrationPrompt}.
59+
*
60+
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/templating">SAP
61+
* AI Core: Orchestration - Templating</a>
5162
*/
5263
@Nullable TemplatingModuleConfig templateConfig;
5364

54-
/** A masking configuration to pseudonymous or anonymize sensitive data in the input. */
65+
/**
66+
* A masking configuration to pseudonymous or anonymize sensitive data in the input.
67+
*
68+
* @link <a
69+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP AI
70+
* Core: Orchestration - Data Masking</a>
71+
*/
5572
@Nullable MaskingModuleConfig maskingConfig;
5673

57-
/** A content filter to filter the prompt. */
74+
/**
75+
* A content filter to filter the prompt.
76+
*
77+
* @link <a
78+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP
79+
* AI Core: Orchestration - Input Filtering</a>
80+
* @link <a
81+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/output-filtering">SAP
82+
* AI Core: Orchestration - Output Filtering</a>
83+
*/
5884
@Nullable FilteringModuleConfig filteringConfig;
5985

6086
/**
6187
* Creates a new configuration with the given LLM configuration.
6288
*
89+
* @link <a
90+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/model-configuration">
91+
* SAP AI Core: Orchestration - Model Configuration</a>
6392
* @param aiModel The LLM configuration to use.
6493
* @return A new configuration with the given LLM configuration.
6594
*/
@@ -72,6 +101,9 @@ public OrchestrationModuleConfig withLlmConfig(@Nonnull final OrchestrationAiMod
72101
/**
73102
* Creates a new configuration with the given Data Masking configuration.
74103
*
104+
* @link <a
105+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP AI
106+
* Core: Orchestration - Data Masking</a>
75107
* @param maskingProvider The Data Masking configuration to use.
76108
* @param maskingProviders Additional Data Masking configurations to use.
77109
* @return A new configuration with the given Data Masking configuration.
@@ -94,6 +126,9 @@ public OrchestrationModuleConfig withMaskingConfig(
94126
*
95127
* <p>Preferred over {@link #withFilteringConfig(FilteringModuleConfig)} for adding input filters.
96128
*
129+
* @link <a
130+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP
131+
* AI Core: Orchestration - Input Filtering</a>
97132
* @param contentFilters one or more content filters to apply to the input.
98133
* @return a new {@code OrchestrationModuleConfig} instance with the specified input filters
99134
* added.
@@ -125,6 +160,9 @@ public OrchestrationModuleConfig withInputFiltering(
125160
* <p>Preferred over {@link #withFilteringConfig(FilteringModuleConfig)} for adding output
126161
* filters.
127162
*
163+
* @link <a
164+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/output-filtering">SAP
165+
* AI Core: Orchestration - Output Filtering</a>
128166
* @param contentFilters one or more content filters to apply to the output.
129167
* @return a new {@code OrchestrationModuleConfig} instance with the specified output filters
130168
* added.

sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OrchestrationController.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ public OrchestrationChatResponse completion() {
4545
/**
4646
* Chat request to OpenAI through the Orchestration service with a template.
4747
*
48+
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/templating">SAP
49+
* AI Core: Orchestration - Templating</a>
4850
* @return the result object
4951
*/
5052
@GetMapping("/template")
@@ -84,6 +86,12 @@ public OrchestrationChatResponse messagesHistory() {
8486
/**
8587
* Apply both input and output filtering for a request to orchestration.
8688
*
89+
* @link <a
90+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP
91+
* AI Core: Orchestration - Input Filtering</a>
92+
* @link <a
93+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/output-filtering">SAP
94+
* AI Core: Orchestration - Output Filtering</a>
8795
* @param policy A high threshold is a loose filter, a low threshold is a strict filter
8896
* @return the result object
8997
*/
@@ -112,6 +120,9 @@ public OrchestrationChatResponse filter(
112120
* user. Anonymize any names given as they are not relevant for judging the sentiment of the
113121
* feedback.
114122
*
123+
* @link <a
124+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP AI
125+
* Core: Orchestration - Data Masking</a>
115126
* @return the result object
116127
*/
117128
@GetMapping("/maskingAnonymization")
@@ -138,6 +149,9 @@ public OrchestrationChatResponse maskingAnonymization() {
138149
* Let the orchestration service a response to a hypothetical user who provided feedback on the AI
139150
* SDK. Pseudonymize the user's name and location to protect their privacy.
140151
*
152+
* @link <a
153+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP AI
154+
* Core: Orchestration - Data Masking</a>
141155
* @return the result object
142156
*/
143157
@GetMapping("/maskingPseudonymization")

0 commit comments

Comments
 (0)