Skip to content

Commit 0329828

Browse files
MatKuhrnewtork
andauthored
[Docs] Document using a custom RG (#247)
* Document using a custom RG * Update docs/guides/OPENAI_CHAT_COMPLETION.md --------- Co-authored-by: Alexander Dümont <[email protected]>
1 parent db3298b commit 0329828

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
@@ -87,7 +87,7 @@ public OpenAiClient withApiVersion(@Nonnull final String apiVersion) {
8787
*
8888
* <pre>{@code
8989
* var destination = new AiCoreService().getInferenceDestination("custom-rg").forModel(GPT_4O);
90-
* OpenAiClient.withCustomDestination(destination).withApiVersion("2024-10-21");
90+
* OpenAiClient.withCustomDestination(destination);
9191
* }</pre>
9292
*
9393
* @param destination The specific {@link HttpDestination} to use.

0 commit comments

Comments
 (0)