From 84d38941c15119e336000ef59208cd739a24289c Mon Sep 17 00:00:00 2001 From: Roshin Rajan Panackal Date: Thu, 10 Oct 2024 16:48:49 +0200 Subject: [PATCH] Correct sentence formatting --- README.md | 3 +-- docs/guides/AI_CORE_DEPLOYMENT.md | 4 +++- docs/guides/OPENAI_CHAT_COMPLETION.md | 20 ++++++++------------ 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 84df8068..31e3976d 100644 --- a/README.md +++ b/README.md @@ -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' diff --git a/docs/guides/AI_CORE_DEPLOYMENT.md b/docs/guides/AI_CORE_DEPLOYMENT.md index 9a2c1c84..af818005 100644 --- a/docs/guides/AI_CORE_DEPLOYMENT.md +++ b/docs/guides/AI_CORE_DEPLOYMENT.md @@ -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 diff --git a/docs/guides/OPENAI_CHAT_COMPLETION.md b/docs/guides/OPENAI_CHAT_COMPLETION.md index 235d2acb..ac0dad9c 100644 --- a/docs/guides/OPENAI_CHAT_COMPLETION.md +++ b/docs/guides/OPENAI_CHAT_COMPLETION.md @@ -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. @@ -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 @@ -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 @@ -154,8 +151,9 @@ try (Stream 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?"; @@ -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.