Skip to content

Commit c663fef

Browse files
modood-alviMatKuhr
andauthored
docs: Update README of sample app to include prerequisites section (#652)
* Update README of sample app to include prerequisites section * Update sample-code/spring-app/README.md --------- Co-authored-by: Matthias Kuhr <52661546+MatKuhr@users.noreply.github.com>
1 parent 955b3e0 commit c663fef

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

sample-code/spring-app/README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@
55
Sample code to demonstrate the usage of the SAP AI SDK.
66
Also used as basis for running E2E tests.
77

8+
## Prerequisites
9+
10+
Before running the application, ensure the following prerequisites are met:
11+
12+
- Java 17 or higher
13+
- Maven 3.8 or higher
14+
- 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
15+
- Deployments of the following models in the `default` resource group:
16+
- `gpt-4o-mini`
17+
- `text-embedding-3-small`
18+
19+
### Setting Up Credentials for SAP AI Core
20+
21+
To set up credentials for the AI Core service:
22+
23+
- 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.
24+
- 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.
25+
26+
### Deploying Generative AI Models in SAP AI Core
27+
28+
To deploy `gpt-4o-mini` and `text-embedding-3-small` models, follow the instructions at:
29+
[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)
30+
831
## Build and Run the Sample App
932

1033
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
1538
> The sample app uses the latest state of the SDK, so make sure to install the SDK after pulling a new version via Git.
1639
> Alternatively, you check out one of the release tags of the repository, e.g. `git fetch --all --tags && git checkout rel/1.1.0`.
1740
18-
Next, you'll need to set up credentials for the AI Core service:
19-
20-
* 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.
21-
22-
⚠️ Put the `.env` file in the sample app directory.
23-
24-
Finally, you can start the sample app:
41+
Start the sample app:
2542

2643
* Run `mvn spring-boot:run` from the sample app directory.
2744

0 commit comments

Comments
 (0)