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
* chore(internal/ci): setup breaking change detection
* Proposal for more intuitive usage of `AzureUrlPathMode` configuration value. (#583)
* Added AzureUrlPathMode.AUTO to encapsulate current behaviour
* Changed default to AzureUrlPathMode.AUTO to be default and provided details in the documentation
* Fixed clientOptions tests
* spotlessApply
* Adjusted README and documentation for AzureUrlPathMode
* SpotlessApply
* release: 3.1.1
---------
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Jose Alvarez <[email protected]>
The OpenAI Java SDK provides convenient access to the [OpenAI REST API](https://platform.openai.com/docs) from applications written in Java.
11
11
12
12
<!-- x-release-please-start-version -->
13
13
14
-
The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/3.1.0).
14
+
The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/3.1.1).
15
15
16
16
<!-- x-release-please-end -->
17
17
@@ -24,7 +24,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfor
See the complete Azure OpenAI example in the [`openai-java-example`](openai-java-example/src/main/java/com/openai/example/AzureEntraIdExample.java) directory. The other examples in the directory also work with Azure as long as the client is configured to use it.
1422
1422
1423
+
### Optional: URL path mode configuration
1424
+
1425
+
The [`ClientOptions`](openai-java-core/src/main/kotlin/com/openai/core/ClientOptions.kt) can be configured to treat Azure OpenAI endpoint URLs differently, depending on your service setup. The default value is [`AzureUrlPathMode.AUTO`](openai-java-core/src/main/kotlin/com/openai/azure/AzureUrlPathMode.kt). To customize the SDK behavior, each value does the following:
1426
+
-`AzureUrlPathMode.LEGACY`: forces the deployment or model name into the path.
1427
+
-`AzureUrlPathMode.UNIFIED`: for newer endpoints ending in `/openai/v1` the service behaviour matches OpenAI's, therefore [`AzureOpenAIServiceVersion`](openai-java-core/src/main/kotlin/com/openai/azure/AzureOpenAIServiceVersion.kt) becomes optional and the model is passed in the request object.
1428
+
-`AzureUrlPathMode.AUTO`: automatically detects the path mode based on the base URL. Default value.
0 commit comments