From 7494ac4dc02af7cdcdff3951de6bfa634affa359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20D=C3=BCmont?= Date: Thu, 17 Oct 2024 13:19:12 +0200 Subject: [PATCH] Update docs --- README.md | 4 ++-- docs/guides/AI_CORE_DEPLOYMENT.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 00d77177..da78f17f 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ After restarting your application, you should see an "aicore" entry in the `VCAP ```java Destination destination = DestinationAccessor.getDestination("my-aicore"); -ApiClient client = Core.getClient(destination); +ApiClient client = new AiCoreService().withDestination(destination); ``` @@ -239,7 +239,7 @@ For more detailed information and advanced usage, please refer to the following: To add a header to AI Core requests, use the following code: ```java -ApiClient client = Core.getClient().addDefaultHeader("header-key", "header-value"); +ApiClient client = new AiCoreService().client().addDefaultHeader("header-key", "header-value"); DeploymentApi api = new DeploymentApi(client); ``` diff --git a/docs/guides/AI_CORE_DEPLOYMENT.md b/docs/guides/AI_CORE_DEPLOYMENT.md index cf891ab4..2477b7fc 100644 --- a/docs/guides/AI_CORE_DEPLOYMENT.md +++ b/docs/guides/AI_CORE_DEPLOYMENT.md @@ -67,7 +67,7 @@ In addition to the prerequisites above, we assume you have already set up the fo Use the following code snippet to create a deployment in SAP AI Core: ```java -var api = new DeploymentApi(getClient()); +var api = new DeploymentApi(new AiCoreService().client()); var resourceGroupId = "default"; AiDeploymentCreationRequest request = @@ -86,7 +86,7 @@ Refer to the [DeploymentController.java](../../sample-code/spring-app/src/main/j AiDeploymentCreationResponse deployment; // provided String deploymentId = deployment.getId(); -var api = new DeploymentApi(getClient()); +var api = new DeploymentApi(new AiCoreService().client()); var resourceGroupId = "default"; if (deployment.getStatus() == AiExecutionStatus.RUNNING) {