Skip to content

Commit 39642e5

Browse files
Applied Alex's review comments
1 parent c3c3938 commit 39642e5

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docs/guides/ORCHESTRATION_CHAT_COMPLETION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ try (Stream<String> stream = client.streamChatCompletion(prompt, config)) {
209209

210210
#### Spring Boot example
211211

212-
Please find [an example in our Spring Boot application](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OrchestrationController.java). It shows the usage of Spring
213-
Boot's `ResponseBodyEmitter` to stream the chat completion delta messages to the frontend in real-time.
212+
Please find [an example in our Spring Boot application](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OrchestrationController.java).
213+
It shows the usage of Spring Boot's `ResponseBodyEmitter` to stream the chat completion delta messages to the frontend in real-time.
214214

215215

216216
### Set model parameters

docs/release-notes/release_notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
### ✨ New Functionality
1414

15-
- Added `streamChatCompletion()` and `streamChatCompletionDeltas()` to the `OrchestrationClient`
15+
- Added `streamChatCompletion()` and `streamChatCompletionDeltas()` to the `OrchestrationClient`.
1616

1717
### 📈 Improvements
1818

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public OrchestrationChatResponse chatCompletion(
114114
* @return A stream of message deltas
115115
* @throws OrchestrationClientException if the request fails or if the finish reason is
116116
* content_filter
117+
* @since 1.1.0
117118
*/
118119
@Nonnull
119120
public Stream<String> streamChatCompletion(
@@ -240,6 +241,7 @@ CompletionPostResponse executeRequest(@Nonnull final String request) {
240241
* @param request the prompt, including messages and other parameters.
241242
* @return A stream of chat completion delta elements.
242243
* @throws OrchestrationClientException if the request fails
244+
* @since 1.1.0
243245
*/
244246
@Nonnull
245247
public Stream<OrchestrationChatCompletionDelta> streamChatCompletionDeltas(
@@ -271,7 +273,6 @@ private static void serializeAndSetHttpEntity(
271273
@Nonnull
272274
private <D extends StreamedDelta> Stream<D> streamRequest(
273275
final BasicClassicHttpRequest request, @Nonnull final Class<D> deltaType) {
274-
val postRequest = new HttpPost("/completion");
275276
try {
276277
val destination = destinationSupplier.get();
277278
log.debug("Using destination {} to connect to orchestration service", destination);

0 commit comments

Comments
 (0)