You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sample-code/spring-app/README.md
+24-7Lines changed: 24 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,29 @@
5
5
Sample code to demonstrate the usage of the SAP AI SDK.
6
6
Also used as basis for running E2E tests.
7
7
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
+
8
31
## Build and Run the Sample App
9
32
10
33
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
15
38
> The sample app uses the latest state of the SDK, so make sure to install the SDK after pulling a new version via Git.
16
39
> Alternatively, you check out one of the release tags of the repository, e.g. `git fetch --all --tags && git checkout rel/1.1.0`.
17
40
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:
25
42
26
43
* Run `mvn spring-boot:run` from the sample app directory.
0 commit comments