2929class OrchestrationController {
3030 @ Autowired private OrchestrationService service ;
3131
32- /** Chat request to an LLM through the Orchestration service with a simple prompt. */
3332 @ GetMapping ("/completion" )
3433 Object completion (@ Nullable @ RequestParam (value = "view" , required = false ) final String view ) {
3534 final var response = service .completion ("HelloWorld!" );
@@ -39,11 +38,6 @@ Object completion(@Nullable @RequestParam(value = "view", required = false) fina
3938 return response .getContent ();
4039 }
4140
42- /**
43- * Asynchronous stream of an LLM chat request
44- *
45- * @return the emitter that streams the assistant message response
46- */
4741 @ GetMapping ("/streamChatCompletion" )
4842 ResponseEntity <ResponseBodyEmitter > streamChatCompletion () {
4943 final var stream = service .streamChatCompletion ("developing a software project" );
@@ -67,12 +61,6 @@ ResponseEntity<ResponseBodyEmitter> streamChatCompletion() {
6761 return ResponseEntity .ok ().contentType (MediaType .TEXT_EVENT_STREAM ).body (emitter );
6862 }
6963
70- /**
71- * Chat request to an LLM through the Orchestration service with a template.
72- *
73- * @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/templating">SAP
74- * AI Core: Orchestration - Templating</a>
75- */
7664 @ GetMapping ("/template" )
7765 Object template (@ Nullable @ RequestParam (value = "view" , required = false ) final String view ) {
7866 final var response = service .template ("German" );
@@ -82,7 +70,6 @@ Object template(@Nullable @RequestParam(value = "view", required = false) final
8270 return response .getContent ();
8371 }
8472
85- /** Chat request to an LLM through the Orchestration service using message history. */
8673 @ GetMapping ("/messagesHistory" )
8774 @ Nonnull
8875 Object messagesHistory (
@@ -94,19 +81,6 @@ Object messagesHistory(
9481 return response .getContent ();
9582 }
9683
97- /**
98- * Send an HTTP GET request for input filtering to the Orchestration service.
99- *
100- * @link <a
101- * href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP
102- * * AI Core: Orchestration - Input Filtering</a>
103- * @param view an optional HTTP header specifying the desired content type for the response.
104- * @param policy path variable specifying the {@link AzureFilterThreshold} the explicitness of
105- * content that should be allowed through the filter
106- * @return a {@link ResponseEntity} containing the filtered input. The response is either in JSON
107- * format if the "accept" header specifies "application/json" or in plain content format
108- * otherwise.
109- */
11084 @ GetMapping ("/inputFiltering/{policy}" )
11185 @ Nonnull
11286 Object inputFiltering (
@@ -128,19 +102,6 @@ Object inputFiltering(
128102 return response .getContent ();
129103 }
130104
131- /**
132- * Send an HTTP GET request for output filtering to the Orchestration service.
133- *
134- * @link <a
135- * href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/output-filtering">SAP
136- * AI Core: Orchestration - Output Filtering</a>
137- * @param view an optional HTTP header specifying the desired content type for the response.
138- * @param policy a mandatory path variable specifying the {@link AzureFilterThreshold} the
139- * explicitness of content that should be allowed through the filter
140- * @return a {@link ResponseEntity} containing the filtered output. The response is either in JSON
141- * format if the "accept" header specifies "application/json" or in plain content format
142- * otherwise.
143- */
144105 @ GetMapping ("/outputFiltering/{policy}" )
145106 @ Nonnull
146107 Object outputFiltering (
@@ -162,15 +123,6 @@ Object outputFiltering(
162123 return response .getContent ();
163124 }
164125
165- /**
166- * Let the orchestration service evaluate the feedback on the AI SDK provided by a hypothetical
167- * user. Anonymize any names given as they are not relevant for judging the sentiment of the
168- * feedback.
169- *
170- * @link <a
171- * href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP AI
172- * Core: Orchestration - Data Masking</a>
173- */
174126 @ GetMapping ("/maskingAnonymization" )
175127 @ Nonnull
176128 Object maskingAnonymization (
@@ -182,9 +134,6 @@ Object maskingAnonymization(
182134 return response .getContent ();
183135 }
184136
185- /**
186- * Chat request to an LLM through the Orchestration deployment under a specific resource group.
187- */
188137 @ GetMapping ("/completion/{resourceGroup}" )
189138 @ Nonnull
190139 Object completionWithResourceGroup (
@@ -197,14 +146,6 @@ Object completionWithResourceGroup(
197146 return response .getContent ();
198147 }
199148
200- /**
201- * Let the orchestration service a response to a hypothetical user who provided feedback on the AI
202- * SDK. Pseudonymize the user's name and location to protect their privacy.
203- *
204- * @link <a
205- * href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/data-masking">SAP AI
206- * Core: Orchestration - Data Masking</a>
207- */
208149 @ GetMapping ("/maskingPseudonymization" )
209150 @ Nonnull
210151 Object maskingPseudonymization (
@@ -216,12 +157,6 @@ Object maskingPseudonymization(
216157 return response .getContent ();
217158 }
218159
219- /**
220- * Using grounding to provide additional context to the AI model.
221- *
222- * @link <a href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/grounding">SAP
223- * AI Core: Orchestration - Grounding</a>
224- */
225160 @ GetMapping ("/grounding" )
226161 @ Nonnull
227162 Object grounding (@ Nullable @ RequestParam (value = "view" , required = false ) final String view ) {
0 commit comments