Skip to content

Commit 8cc4aac

Browse files
committed
Document using a custom RG
1 parent eb664b3 commit 8cc4aac

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

docs/guides/OPENAI_CHAT_COMPLETION.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ In addition to the prerequisites above, we assume you have already set up the fo
4747
- Refer
4848
to [How to deploy a model to AI Core](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-deployment-for-generative-ai-model-in-sap-ai-core)
4949
for setup instructions.
50+
- In case the model is deployed in a custom resource group, refer to [this section](#using-a-custom-resource-group).
5051
- <details>
5152
<summary>Example deployed model from the AI Core <code>/deployments</code> endpoint</summary>
5253

@@ -97,6 +98,15 @@ OpenAiChatCompletionOutput result =
9798
String resultMessage = result.getContent();
9899
```
99100

101+
### Using a Custom Resource Group
102+
103+
```java
104+
var destination = new AiCoreService()
105+
.getInferenceDestination("custom-rg")
106+
.forModel(GPT_4O);
107+
OpenAiClient.withCustomDestination(destination);
108+
```
109+
100110
### Message history
101111

102112
```java

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public OpenAiClient withApiVersion(@Nonnull final String apiVersion) {
8585
*
8686
* <pre>{@code
8787
* var destination = new AiCoreService().getInferenceDestination("custom-rg").forModel(GPT_4O);
88-
* OpenAiClient.withCustomDestination(destination).withApiVersion("2024-10-21");
88+
* OpenAiClient.withCustomDestination(destination);
8989
* }</pre>
9090
*
9191
* @param destination The specific {@link HttpDestination} to use.

0 commit comments

Comments
 (0)