Skip to content

Commit 3683063

Browse files
committed
Fixing docs formatting, sample messages and release notes module tagging
1 parent 704fad8 commit 3683063

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

docs/guides/OPENAI_CHAT_COMPLETION.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ OpenAiClient.withCustomDestination(destination);
129129
```java
130130
var request =
131131
new OpenAiChatCompletionRequest(
132-
OpenAiMessage.system("I'm fine, thank you!"),
133-
OpenAiMessage.user("Hello, how are you?"));
132+
OpenAiMessage.system("You are a helpful assistant"),
133+
OpenAiMessage.user("Hello World! Why is this phrase so famous?"));
134134

135135
var response = OpenAiClient.forModel(GPT_4O).chatCompletion(request).getContent();
136136
```
@@ -203,8 +203,7 @@ try (Stream<String> stream = client.streamChatCompletion(msg)) {
203203

204204
**Since v1.4.0**
205205

206-
The following example demonstrate how you can leverage a concurrency-safe container (like an AtomicReference) to "listen" for usage information in
207-
any incoming delta.
206+
The following example demonstrate how you can leverage a concurrency-safe container (like an AtomicReference) to "listen" for usage information in any incoming delta.
208207

209208
```java
210209
String question = "Can you give me the first 100 numbers of the Fibonacci sequence?";
@@ -233,7 +232,8 @@ Thread streamProcessor =
233232

234233
// Start the processing thread; the main thread remains free (non-blocking)
235234
streamProcessor.start();
236-
streamProcessor.join(); // Wait for the thread to finish (blocking)
235+
// Wait for the thread to finish (blocking)
236+
streamProcessor.join();
237237

238238
// Access information caught from completion usage
239239
Integer tokensUsed = usageRef.get().getCompletionTokens();

docs/release-notes/release_notes.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@
1010

1111
- [Orchestration] The constructors `UserMessage(MessageContent)` and `SystemMessage(MessageContent)` are removed. Use `Message.user(String)`, `Message.user(ImageItem)`, or `Message.system(String)` instead.
1212
- Deprecate `getCustomField(String)` in favor of `toMap()` on generated model classes.
13-
- `com.sap.ai.sdk.core.model.*`
14-
- `com.sap.ai.sdk.orchestration.model.*`
13+
- `com.sap.ai.sdk.core.model.*`
14+
- `com.sap.ai.sdk.orchestration.model.*`
1515

1616
### ✨ New Functionality
1717

1818
- [Orchestration] [Add Spring AI tool calling](../guides/SPRING_AI_INTEGRATION.md#tool-calling).
1919
- [Document Grounding] [Add Document Grounding Client](https://github.com/SAP/ai-sdk-java/tree/main/docs/guides/GROUNDING.md)
2020
- `com.sap.ai.sdk:document-grounding:1.4.0`
21-
- [OpenAI] New generated model classes introduced for _AzureOpenAI_ specification dated 2024-10-21.
22-
- [OpenAI] Introducing [new user interface](../guides/OPENAI_CHAT_COMPLETION.md/#new-user-interface-v140) for chat completion wrapping the generated model classes.
23-
- `OpenAiChatCompletionRequest` and `OpenAiChatCompletionResponse`' for high level request and response handling.
24-
- `OpenAiUserMessage`, `OpenAiSystemMessage`, `OpenAiAssistantMessage` and `OpenAiToolMessage` for message creation for different content types.
25-
- `OpenAiToolChoice` for configuring chat completion requests with tool selection strategy.
26-
- [OpenAI] Introducing new user interface for embedding calls using `OpenAiEmbeddingRequest` and `OpenAiEmbeddingResponse`.
21+
- [OpenAI]
22+
- New generated model classes introduced for _AzureOpenAI_ specification dated 2024-10-21.
23+
- Introducing [new user interface](../guides/OPENAI_CHAT_COMPLETION.md/#new-user-interface-v140) for chat completion wrapping the generated model classes.
24+
- `OpenAiChatCompletionRequest` and `OpenAiChatCompletionResponse`' for high level request and response handling.
25+
- `OpenAiUserMessage`, `OpenAiSystemMessage`, `OpenAiAssistantMessage` and `OpenAiToolMessage` for message creation for different content types.
26+
- `OpenAiToolChoice` for configuring chat completion requests with tool selection strategy.
27+
- Introducing new user interface for embedding calls using `OpenAiEmbeddingRequest` and `OpenAiEmbeddingResponse`.
2728

2829
### 📈 Improvements
2930

0 commit comments

Comments
 (0)