From eca6f6b893df95e16bf477eac40aa9e9e4238bc7 Mon Sep 17 00:00:00 2001 From: Modood Alvi Date: Wed, 12 Nov 2025 21:55:29 +0100 Subject: [PATCH 1/2] Update README of sample app to include prerequisites section --- sample-code/spring-app/README.md | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/sample-code/spring-app/README.md b/sample-code/spring-app/README.md index b893c541d..f83eeb851 100644 --- a/sample-code/spring-app/README.md +++ b/sample-code/spring-app/README.md @@ -5,6 +5,29 @@ Sample code to demonstrate the usage of the SAP AI SDK. Also used as basis for running E2E tests. +## Prerequisites + +Before running the application, ensure the following prerequisites are met: + +- Java 17 or higher +- Maven 3.8 or higher +- Deployments of the following models in [SAP AI Core](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/what-is-sap-ai-core): + - `gpt-4o-mini` + - `text-embedding-3-small` +- Credentials for [SAP AI Core](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/what-is-sap-ai-core) service configured + +### Setting Up Credentials for SAP AI Core + +To set up credentials for the AI Core service: + +- Follow the instruction at [Connecting to AI Core](https://sap.github.io/ai-sdk/docs/java/guides/connecting-to-ai-core) to create a service key for the AI Core service. +- Add the service key content either to a `.env` file in the sample app directory or directly to the `AI_CORE_SERVICE_KEY` environment variable. + +### Deploying Generative AI Models in SAP AI Core + +To deploy `gpt-4o-mini` and `text-embedding-3-small` models, follow the instructions at: +[Create a Deployment for a Generative AI Model](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-deployment-for-generative-ai-model-in-sap-ai-core) + ## Build and Run the Sample App Before you can run the sample app, you need to install the AI SDK into your local Maven repository: @@ -15,13 +38,7 @@ Before you can run the sample app, you need to install the AI SDK into your loca > The sample app uses the latest state of the SDK, so make sure to install the SDK after pulling a new version via Git. > Alternatively, you check out one of the release tags of the repository, e.g. `git fetch --all --tags && git checkout rel/1.1.0`. -Next, you'll need to set up credentials for the AI Core service: - -* Follow [these instructions](https://sap.github.io/ai-sdk/docs/java/guides/connecting-to-ai-core) to create a service key for the AI Core service. - - ⚠️ Put the `.env` file in the sample app directory. - -Finally, you can start the sample app: +Start the sample app: * Run `mvn spring-boot:run` from the sample app directory. From 37bd43b1cfff7c97b97e020b470827feab67fb7a Mon Sep 17 00:00:00 2001 From: Matthias Kuhr <52661546+MatKuhr@users.noreply.github.com> Date: Thu, 13 Nov 2025 08:49:02 +0100 Subject: [PATCH 2/2] Update sample-code/spring-app/README.md --- sample-code/spring-app/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample-code/spring-app/README.md b/sample-code/spring-app/README.md index f83eeb851..9286027c9 100644 --- a/sample-code/spring-app/README.md +++ b/sample-code/spring-app/README.md @@ -11,10 +11,10 @@ Before running the application, ensure the following prerequisites are met: - Java 17 or higher - Maven 3.8 or higher -- Deployments of the following models in [SAP AI Core](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/what-is-sap-ai-core): +- Credentials for [SAP AI Core](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/what-is-sap-ai-core) service configured +- Deployments of the following models in the `default` resource group: - `gpt-4o-mini` - `text-embedding-3-small` -- Credentials for [SAP AI Core](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/what-is-sap-ai-core) service configured ### Setting Up Credentials for SAP AI Core