Skip to content

Commit 529b37e

Browse files
Aligned headers
1 parent ab63181 commit 529b37e

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

docs/guides/AI_CORE_DEPLOYMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ In addition to the prerequisites above, we assume you have already set up the fo
6666
```
6767
</details>
6868

69-
### Create a Deployment
69+
## Create a Deployment
7070

7171
Use the following code snippet to create a deployment in SAP AI Core:
7272

@@ -84,7 +84,7 @@ AiExecutionStatus status = deployment.getStatus();
8484

8585
Refer to the [DeploymentController.java](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/DeploymentController.java) in our Spring Boot application for a complete example.
8686

87-
### Delete a Deployment
87+
## Delete a Deployment
8888

8989
```java
9090
AiDeploymentCreationResponse deployment; // provided

docs/guides/OPENAI_CHAT_COMPLETION.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ In addition to the prerequisites above, we assume you have already set up the fo
8787

8888
</details>
8989

90-
### Simple chat completion
90+
## Simple chat completion
9191

9292
```java
9393
var result =
@@ -98,7 +98,7 @@ var result =
9898
String resultMessage = result.getContent();
9999
```
100100

101-
### Using a Custom Resource Group
101+
## Using a Custom Resource Group
102102

103103
```java
104104
var destination = new AiCoreService()
@@ -107,7 +107,7 @@ var destination = new AiCoreService()
107107
OpenAiClient.withCustomDestination(destination);
108108
```
109109

110-
### Message history
110+
## Message history
111111

112112
```java
113113
var systemMessage =
@@ -124,7 +124,7 @@ String resultMessage = result.getContent();
124124

125125
See [an example in our Spring Boot application](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OpenAiController.java)
126126

127-
### Chat Completion with Specific Model Version
127+
## Chat Completion with Specific Model Version
128128

129129
By default, when no version is specified, the system selects one of the available deployments of the specified model, regardless of its version.
130130
To target a specific version, you can specify the model version along with the model.
@@ -134,7 +134,7 @@ OpenAiChatCompletionOutput result =
134134
OpenAiClient.forModel(GPT_35_TURBO.withVersion("1106")).chatCompletion(request);
135135
```
136136

137-
### Chat completion with Custom Model
137+
## Chat completion with Custom Model
138138

139139
You can also use a custom OpenAI model for chat completion by creating an `OpenAiModel` object.
140140

@@ -145,11 +145,11 @@ OpenAiChatCompletionOutput result =
145145

146146
Ensure that the custom model is deployed in SAP AI Core.
147147

148-
### Stream chat completion
148+
## Stream chat completion
149149

150150
It's possible to pass a stream of chat completion delta elements, e.g. from the application backend to the frontend in real-time.
151151

152-
#### Asynchronous Streaming
152+
### Asynchronous Streaming
153153

154154
This is a blocking example for streaming and printing directly to the console:
155155

@@ -168,7 +168,7 @@ try (Stream<String> stream = client.streamChatCompletion(msg)) {
168168
}
169169
```
170170

171-
#### Aggregating Total Output
171+
### Aggregating Total Output
172172

173173
The following example is non-blocking and demonstrates how to aggregate the complete response.
174174
Any asynchronous library can be used, such as the classic Thread API.
@@ -205,12 +205,10 @@ Integer tokensUsed = totalOutput.getUsage().getCompletionTokens();
205205
System.out.println("Tokens used: " + tokensUsed);
206206
```
207207

208-
#### Spring Boot example
209-
210208
Please find [an example in our Spring Boot application](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OpenAiController.java). It shows the usage of Spring
211209
Boot's `ResponseBodyEmitter` to stream the chat completion delta messages to the frontend in real-time.
212210

213-
### Embedding
211+
## Embedding
214212

215213
Get the embeddings of a text input in list of float values:
216214

docs/guides/ORCHESTRATION_CHAT_COMPLETION.md

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

2121
This guide provides examples of how to use the Orchestration service in SAP AI Core for chat completion tasks using the SAP AI SDK for Java.
2222

23-
# Prerequisites
23+
## Prerequisites
2424

2525
Before using the AI Core module, ensure that you have met all the general requirements outlined in the [README.md](../../README.md#general-requirements).
2626
Additionally, include the necessary Maven dependency in your project.

0 commit comments

Comments
 (0)