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
For more information, please refer to the [AI Core connectivity guide](https://sap.github.io/ai-sdk/docs/java/guides/connecting-to-ai-core) and the [SAP Cloud SDK documentation](https://sap.github.io/cloud-sdk/docs/java/features/connectivity/http-destinations).
182
177
183
-
There is also a convenient method to add custom headers to single calls through the orchestration or OpenAI client.
184
-
For more information, see the respective documentation of the [OrchestrationClient](https://sap.github.io/ai-sdk/docs/java/orchestration/chat-completion#custom-headers) and [OpenAIClient](https://sap.github.io/ai-sdk/docs/java/foundation-models/openai/chat-completion#custom-headers).
178
+
There is also a convenient method to add custom headers to single calls through the Orchestration or OpenAI client.
179
+
180
+
```java
181
+
var client =newOrchestrationClient();
182
+
183
+
var result = client.withHeader("my-header-key", "my-header-value").chatCompletion(prompt, config);
184
+
```
185
+
186
+
For more information on this feature, see the respective documentation of the [OrchestrationClient](https://sap.github.io/ai-sdk/docs/java/orchestration/chat-completion#custom-headers) and [OpenAIClient](https://sap.github.io/ai-sdk/docs/java/foundation-models/openai/chat-completion#custom-headers).
185
187
186
188
### _"There's a vulnerability warning `CVE-2021-41251`?"_
0 commit comments