Skip to content

Commit

Permalink
Correct sentence formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Roshin Rajan Panackal committed Oct 10, 2024
1 parent 405dd8b commit 84d3894
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ To interact with SAP AI Core services, the SAP AI SDK requires credentials avail

By default, the SDK automatically extracts these credentials from a service instance of type `aicore` bound to your application.

If
running the application locally without this service binding, you may encounter an exception:
If running the application locally without this service binding, you may encounter an exception:

```
Could not find any matching service bindings for service identifier 'aicore'
Expand Down
4 changes: 3 additions & 1 deletion docs/guides/AI_CORE_DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ This guide provides examples on how to create and manage deployments in SAP AI C

## Prerequisites

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

Additionally, include the necessary Maven dependency in your project.

### Maven Dependencies

Expand Down
20 changes: 8 additions & 12 deletions docs/guides/OPENAI_CHAT_COMPLETION.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ on SAP AI Core.

## Prerequisites

Before using the AI Core module, ensure that you have met all the general requirements outlined in
the [README.md](../../README.md#general-requirements).
Before using the AI Core module, ensure that you have met all the general requirements outlined in the [README.md](../../README.md#general-requirements).

Additionally, include the necessary Maven dependency in your project.

Expand All @@ -44,8 +43,7 @@ See [an example pom in our Spring Boot application](../../sample-code/spring-app

## Usage

In addition to the prerequisites above, we assume you have already set up the following to carry out the examples in
this guide:
In addition to the prerequisites above, we assume you have already set up the following to carry out the examples in this guide:

- **A Deployed OpenAI Model in SAP AI Core**
- Refer
Expand Down Expand Up @@ -130,8 +128,7 @@ final OpenAiChatCompletionOutput result =

### Stream chat completion

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

#### Asynchronous Streaming

Expand All @@ -154,8 +151,9 @@ try (Stream<String> stream = client.streamChatCompletion(msg)) {

#### Aggregating Total Output

The following example is non-blocking and demonstrates how to aggregate the complete response. Any asynchronous library
can be used, such as the classic Thread API.
The following example is non-blocking and demonstrates how to aggregate the complete response.

Any asynchronous library can be used, such as the classic Thread API.

```java
final var message = "Can you give me the first 100 numbers of the Fibonacci sequence?";
Expand Down Expand Up @@ -191,7 +189,5 @@ System.out.println("Tokens used: " + tokensUsed);

#### Spring Boot example

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 Boot's `ResponseBodyEmitter` to stream the chat completion delta messages to the frontend
in real-time.
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
Boot's `ResponseBodyEmitter` to stream the chat completion delta messages to the frontend in real-time.

0 comments on commit 84d3894

Please sign in to comment.