Skip to content

Commit 3d0d337

Browse files
committed
fixing unnecessary diffs
1 parent 0424e27 commit 3d0d337

File tree

2 files changed

+63
-63
lines changed

2 files changed

+63
-63
lines changed

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ public class OrchestrationModuleConfig {
135135
/**
136136
* Creates a new configuration with the given LLM configuration.
137137
*
138-
* @param aiModel The LLM configuration to use.
139-
* @return A new configuration with the given LLM configuration.
140138
* @link <a
141139
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/model-configuration">
142140
* SAP AI Core: Orchestration - Model Configuration</a>
141+
* @param aiModel The LLM configuration to use.
142+
* @return A new configuration with the given LLM configuration.
143143
*/
144144
@Tolerate
145145
@Nonnull
@@ -165,12 +165,12 @@ public OrchestrationModuleConfig withStreamConfig(
165165
/**
166166
* Creates a new configuration with the given Data Masking configuration.
167167
*
168-
* @param maskingProvider The Data Masking configuration to use.
169-
* @param maskingProviders Additional Data Masking configurations to use.
170-
* @return A new configuration with the given Data Masking configuration.
171168
* @link <a
172169
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP AI
173170
* Core: Orchestration - Data Masking</a>
171+
* @param maskingProvider The Data Masking configuration to use.
172+
* @param maskingProviders Additional Data Masking configurations to use.
173+
* @return A new configuration with the given Data Masking configuration.
174174
*/
175175
@Tolerate
176176
@Nonnull
@@ -190,13 +190,13 @@ public OrchestrationModuleConfig withMaskingConfig(
190190
*
191191
* <p>Preferred over {@link #withFilteringConfig(FilteringModuleConfig)} for adding input filters.
192192
*
193+
* @link <a
194+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP
195+
* AI Core: Orchestration - Input Filtering</a>
193196
* @param contentFilter a filter to apply to the input.
194197
* @param contentFilters zero or more additional content filters to apply to the input.
195198
* @return a new {@code OrchestrationModuleConfig} instance with the specified input filters
196199
* added.
197-
* @link <a
198-
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP
199-
* AI Core: Orchestration - Input Filtering</a>
200200
*/
201201
@Nonnull
202202
public OrchestrationModuleConfig withInputFiltering(
@@ -228,13 +228,13 @@ public OrchestrationModuleConfig withInputFiltering(
228228
* <p>Preferred over {@link #withFilteringConfig(FilteringModuleConfig)} for adding output
229229
* filters.
230230
*
231+
* @link <a
232+
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/output-filtering">SAP
233+
* AI Core: Orchestration - Output Filtering</a>
231234
* @param contentFilter a filter to apply to the input.
232235
* @param contentFilters zero or more additional content filters to apply to the input.
233236
* @return a new {@code OrchestrationModuleConfig} instance with the specified output filters
234237
* added.
235-
* @link <a
236-
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/output-filtering">SAP
237-
* AI Core: Orchestration - Output Filtering</a>
238238
*/
239239
@Nonnull
240240
public OrchestrationModuleConfig withOutputFiltering(
@@ -266,11 +266,11 @@ public OrchestrationModuleConfig withOutputFiltering(
266266
/**
267267
* Creates a new configuration with the given output filtering stream options.
268268
*
269-
* @param outputFilteringStreamOptions The output filtering stream options to use.
270-
* @return A new configuration with the given output filtering stream options.
271269
* @see <a
272270
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/streaming">Orchestration
273271
* documentation on streaming.</a>
272+
* @param outputFilteringStreamOptions The output filtering stream options to use.
273+
* @return A new configuration with the given output filtering stream options.
274274
*/
275275
@Nonnull
276276
OrchestrationModuleConfig withOutputFilteringStreamOptions(
@@ -293,10 +293,10 @@ OrchestrationModuleConfig withOutputFilteringStreamOptions(
293293
/**
294294
* Creates a new configuration with the given grounding configuration.
295295
*
296-
* @param groundingProvider The grounding configuration to use.
297-
* @return A new configuration with the given grounding configuration.
298296
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/grounding">SAP
299297
* AI Core: Orchestration - Grounding</a>
298+
* @param groundingProvider The grounding configuration to use.
299+
* @return A new configuration with the given grounding configuration.
300300
*/
301301
@Nonnull
302302
public OrchestrationModuleConfig withGrounding(
@@ -307,10 +307,10 @@ public OrchestrationModuleConfig withGrounding(
307307
/**
308308
* Creates a new configuration with the given template configuration as {@link TemplateConfig}.
309309
*
310-
* @param templateConfig The template configuration to use.
311-
* @return A new configuration with the given template configuration.
312310
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/templating">SAP
313311
* AI Core: Orchestration - Templating</a>
312+
* @param templateConfig The template configuration to use.
313+
* @return A new configuration with the given template configuration.
314314
* @since 1.4.0
315315
*/
316316
@Tolerate

sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OrchestrationService.java

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ public Stream<String> streamChatCompletion(@Nonnull final String topic) {
113113
/**
114114
* Chat request to OpenAI through the Orchestration service with a template.
115115
*
116-
* @param language the language to use in the template
117-
* @return the assistant response object
118116
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/templating">SAP
119117
* AI Core: Orchestration - Templating</a>
118+
* @param language the language to use in the template
119+
* @return the assistant response object
120120
*/
121121
@Nonnull
122122
public OrchestrationChatResponse template(@Nonnull final String language) {
@@ -153,12 +153,12 @@ public OrchestrationChatResponse messagesHistory(@Nonnull final String prevMessa
153153
/**
154154
* Apply input filtering for a request to orchestration.
155155
*
156-
* @param policy the explicitness of content that should be allowed through the filter
157-
* @return the assistant response object
158-
* @throws OrchestrationClientException if input filter filters the prompt
159156
* @link <a
160157
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP
161158
* AI Core: Orchestration - Input Filtering</a>
159+
* @throws OrchestrationClientException if input filter filters the prompt
160+
* @param policy the explicitness of content that should be allowed through the filter
161+
* @return the assistant response object
162162
*/
163163
@Nonnull
164164
public OrchestrationChatResponse inputFiltering(@Nonnull final AzureFilterThreshold policy)
@@ -182,11 +182,11 @@ public OrchestrationChatResponse inputFiltering(@Nonnull final AzureFilterThresh
182182
/**
183183
* Apply output filtering for a request to orchestration.
184184
*
185-
* @param policy the explicitness of content that should be allowed through the filter
186-
* @return the assistant response object
187185
* @link <a
188186
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/output-filtering">SAP
189187
* AI Core: Orchestration - Output Filtering</a>
188+
* @param policy the explicitness of content that should be allowed through the filter
189+
* @return the assistant response object
190190
*/
191191
@Nonnull
192192
public OrchestrationChatResponse outputFiltering(@Nonnull final AzureFilterThreshold policy) {
@@ -207,12 +207,12 @@ public OrchestrationChatResponse outputFiltering(@Nonnull final AzureFilterThres
207207
/**
208208
* Apply the Llama Guard filter.
209209
*
210-
* @param filter enable or disable the filter
211-
* @return the assistant response object
212-
* @throws OrchestrationClientException if input filter filters the prompt
213210
* @link <a
214211
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP
215212
* AI Core: Orchestration - Input Filtering</a>
213+
* @throws OrchestrationClientException if input filter filters the prompt
214+
* @param filter enable or disable the filter
215+
* @return the assistant response object
216216
*/
217217
@Nonnull
218218
public OrchestrationChatResponse llamaGuardInputFilter(final boolean filter)
@@ -249,11 +249,11 @@ public OrchestrationChatResponse llamaGuardInputFilter(final boolean filter)
249249
* user. Anonymize any names given as they are not relevant for judging the sentiment of the
250250
* feedback.
251251
*
252-
* @param entity the entity to be masked
253-
* @return the assistant response object
254252
* @link <a
255253
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP AI
256254
* Core: Orchestration - Data Masking</a>
255+
* @param entity the entity to be masked
256+
* @return the assistant response object
257257
*/
258258
@Nonnull
259259
public OrchestrationChatResponse maskingAnonymization(@Nonnull final DPIEntities entity) {
@@ -263,9 +263,9 @@ public OrchestrationChatResponse maskingAnonymization(@Nonnull final DPIEntities
263263
val userMessage =
264264
Message.user(
265265
"""
266-
I think the SDK is good, but could use some further enhancements.
267-
My architect Alice and manager Bob pointed out that we need the grounding capabilities, which aren't supported yet.
268-
""");
266+
I think the SDK is good, but could use some further enhancements.
267+
My architect Alice and manager Bob pointed out that we need the grounding capabilities, which aren't supported yet.
268+
""");
269269

270270
val prompt = new OrchestrationPrompt(systemMessage, userMessage);
271271
val maskingConfig = DpiMasking.anonymization().withEntities(entity);
@@ -277,10 +277,10 @@ public OrchestrationChatResponse maskingAnonymization(@Nonnull final DPIEntities
277277
/**
278278
* Let the LLM respond with a masked repeated phrase of patient IDs.
279279
*
280-
* @return the assistant response object
281280
* @link <a
282281
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP AI
283282
* Core: Orchestration - Data Masking</a>
283+
* @return the assistant response object
284284
*/
285285
@Nonnull
286286
public OrchestrationChatResponse maskingRegex() {
@@ -319,30 +319,30 @@ public OrchestrationChatResponse completionWithResourceGroup(
319319
* Let the orchestration service a response to a hypothetical user who provided feedback on the AI
320320
* SDK. Pseudonymize the user's name and location to protect their privacy.
321321
*
322-
* @param entity the entity to be pseudonymized
323-
* @return the assistant response object
324322
* @link <a
325323
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP AI
326324
* Core: Orchestration - Data Masking</a>
325+
* @param entity the entity to be pseudonymized
326+
* @return the assistant response object
327327
*/
328328
@Nonnull
329329
public OrchestrationChatResponse maskingPseudonymization(@Nonnull final DPIEntities entity) {
330330
val systemMessage =
331331
Message.system(
332332
"""
333-
Please write an initial response to the below user feedback, stating that we are working on the feedback and will get back to them soon.
334-
Please make sure to address the user in person and end with "Best regards, the AI SDK team".
335-
""");
333+
Please write an initial response to the below user feedback, stating that we are working on the feedback and will get back to them soon.
334+
Please make sure to address the user in person and end with "Best regards, the AI SDK team".
335+
""");
336336
val userMessage =
337337
Message.user(
338338
"""
339-
Username: Mallory
340-
userEmail: [email protected]
341-
Date: 2022-01-01
339+
Username: Mallory
340+
userEmail: [email protected]
341+
Date: 2022-01-01
342342
343-
I think the SDK is good, but could use some further enhancements.
344-
My architect Alice and manager Bob pointed out that we need the grounding capabilities, which aren't supported yet.
345-
""");
343+
I think the SDK is good, but could use some further enhancements.
344+
My architect Alice and manager Bob pointed out that we need the grounding capabilities, which aren't supported yet.
345+
""");
346346

347347
val prompt = new OrchestrationPrompt(systemMessage, userMessage);
348348
val maskingConfig = DpiMasking.pseudonymization().withEntities(entity, DPIEntities.EMAIL);
@@ -354,11 +354,11 @@ public OrchestrationChatResponse maskingPseudonymization(@Nonnull final DPIEntit
354354
/**
355355
* Using grounding to provide additional context to the AI model.
356356
*
357+
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/grounding">SAP
358+
* AI Core: Orchestration - Grounding</a>
357359
* @param userMessage the user message to provide grounding for
358360
* @param maskGroundingInput whether to mask the request sent to the Grounding Service
359361
* @return the assistant response object
360-
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/grounding">SAP
361-
* AI Core: Orchestration - Grounding</a>
362362
*/
363363
@Nonnull
364364
public OrchestrationChatResponse grounding(
@@ -392,10 +392,10 @@ public OrchestrationChatResponse grounding(
392392
/**
393393
* Using grounding via a sharepoint repository to provide additional context to the AI model.
394394
*
395-
* @param userMessage the user message to provide grounding for
396-
* @return the assistant response object
397395
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/grounding">SAP
398396
* AI Core: Orchestration - Grounding</a>
397+
* @param userMessage the user message to provide grounding for
398+
* @return the assistant response object
399399
*/
400400
@Nonnull
401401
public OrchestrationChatResponse groundingSharepoint(@Nonnull final String userMessage) {
@@ -420,10 +420,10 @@ public OrchestrationChatResponse groundingSharepoint(@Nonnull final String userM
420420
/**
421421
* Using grounding via *help.sap.com* to provide additional SAP-specific context to the AI model.
422422
*
423-
* @param userMessage the user message to provide grounding for
424-
* @return the assistant response object
425423
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/grounding">SAP
426424
* AI Core: Orchestration - Grounding</a>
425+
* @param userMessage the user message to provide grounding for
426+
* @return the assistant response object
427427
*/
428428
@Nonnull
429429
public OrchestrationChatResponse groundingHelpSapCom(@Nonnull final String userMessage) {
@@ -483,11 +483,11 @@ public OrchestrationChatResponse responseFormatJsonSchema(
483483
* Chat request to OpenAI through the Orchestration service using the response format option 'JSON
484484
* object'.
485485
*
486-
* @param word the word to translate
487-
* @return the assistant response object
488486
* @link <a
489487
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/structured-output">SAP
490488
* AI Core: Orchestration - Structured Output</a>
489+
* @param word the word to translate
490+
* @return the assistant response object
491491
*/
492492
@Nonnull
493493
public OrchestrationChatResponse responseFormatJsonObject(@Nonnull final String word) {
@@ -507,11 +507,11 @@ public OrchestrationChatResponse responseFormatJsonObject(@Nonnull final String
507507
* Chat request to OpenAI through the Orchestration service using the response format option
508508
* 'text'.
509509
*
510-
* @param word the word to translate
511-
* @return the assistant response object
512510
* @link <a
513511
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/structured-output">SAP
514512
* AI Core: Orchestration - Structured Output</a>
513+
* @param word the word to translate
514+
* @return the assistant response object
515515
*/
516516
@Nonnull
517517
public OrchestrationChatResponse responseFormatText(@Nonnull final String word) {
@@ -533,10 +533,10 @@ public OrchestrationChatResponse responseFormatText(@Nonnull final String word)
533533
* Chat request to OpenAI through the Orchestration service using a template from the prompt
534534
* registry.
535535
*
536-
* @param topic the topic to send to the assistant
537-
* @return the assistant response object
538536
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/templating">SAP
539537
* AI Core: Orchestration - Templating</a>
538+
* @param topic the topic to send to the assistant
539+
* @return the assistant response object
540540
*/
541541
@Nonnull
542542
public OrchestrationChatResponse templateFromPromptRegistryById(@Nonnull final String topic) {
@@ -556,10 +556,10 @@ public OrchestrationChatResponse templateFromPromptRegistryById(@Nonnull final S
556556
* Chat request to OpenAI through the Orchestration service using a template from the prompt
557557
* registry.
558558
*
559-
* @param topic the topic to send to the assistant
560-
* @return the assistant response object
561559
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/templating">SAP
562560
* AI Core: Orchestration - Templating</a>
561+
* @param topic the topic to send to the assistant
562+
* @return the assistant response object
563563
*/
564564
@Nonnull
565565
public OrchestrationChatResponse templateFromPromptRegistryByScenario(
@@ -576,11 +576,11 @@ public OrchestrationChatResponse templateFromPromptRegistryByScenario(
576576
/**
577577
* Chat request to an LLM through the Orchestration service using a local template file.
578578
*
579-
* @param promptTemplate the YAML prompt template to use
580-
* @return the assistant response object
581-
* @throws IOException if the YAML cannot be parsed
582579
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/templating">SAP
583580
* AI Core: Orchestration - Templating</a>
581+
* @param promptTemplate the YAML prompt template to use
582+
* @throws IOException if the YAML cannot be parsed
583+
* @return the assistant response object
584584
*/
585585
@Nonnull
586586
public OrchestrationChatResponse localPromptTemplate(@Nonnull final String promptTemplate)
@@ -624,10 +624,10 @@ public OrchestrationChatResponse translation() {
624624
/**
625625
* Create text embeddings using the Orchestration service.
626626
*
627-
* @param texts the list of texts to embed
628-
* @return the embedding response object
629627
* @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/embeddings">AI
630628
* Core: Orchestration - Embedding</a>
629+
* @param texts the list of texts to embed
630+
* @return the embedding response object
631631
*/
632632
@Nonnull
633633
public OrchestrationEmbeddingResponse embed(@Nonnull final List<String> texts) {

0 commit comments

Comments
 (0)