Skip to content

Commit a117892

Browse files
authored
feat(api): Add more new Azure service versions (#208)
* add more new Azure service version and update azure samples * revert samples changes
1 parent 3ab4110 commit a117892

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

openai-java-core/src/main/kotlin/com/openai/azure/AzureOpenAIServiceVersion.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class AzureOpenAIServiceVersion private constructor(@get:JvmName("value") val va
1616
@JvmStatic val V2023_05_15 = fromString("2023-05-15")
1717
@JvmStatic val V2024_02_01 = fromString("2024-02-01")
1818
@JvmStatic val V2024_06_01 = fromString("2024-06-01")
19+
@JvmStatic val V2024_10_21 = fromString("2024-10-21")
1920
@JvmStatic val V2023_06_01_PREVIEW = fromString("2023-06-01-preview")
2021
@JvmStatic val V2023_07_01_PREVIEW = fromString("2023-07-01-preview")
2122
@JvmStatic val V2024_02_15_PREVIEW = fromString("2024-02-15-preview")
@@ -25,6 +26,9 @@ class AzureOpenAIServiceVersion private constructor(@get:JvmName("value") val va
2526
@JvmStatic val V2024_07_01_PREVIEW = fromString("2024-07-01-preview")
2627
@JvmStatic val V2024_08_01_PREVIEW = fromString("2024-08-01-preview")
2728
@JvmStatic val V2024_09_01_PREVIEW = fromString("2024-09-01-preview")
29+
@JvmStatic val V2024_10_01_PREVIEW = fromString("2024-10-01-preview")
30+
@JvmStatic val V2024_12_01_PREVIEW = fromString("2024-12-01-preview")
31+
@JvmStatic val V2025_01_01_PREVIEW = fromString("2025-01-01-preview")
2832
}
2933

3034
override fun equals(other: Any?): Boolean =

openai-java-core/src/main/kotlin/com/openai/core/ClientOptions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package com.openai.core
44

55
import com.fasterxml.jackson.databind.json.JsonMapper
66
import com.openai.azure.AzureOpenAIServiceVersion
7-
import com.openai.azure.AzureOpenAIServiceVersion.Companion.V2024_06_01
7+
import com.openai.azure.AzureOpenAIServiceVersion.Companion.V2024_10_21
88
import com.openai.azure.credential.AzureApiKeyCredential
99
import com.openai.core.http.Headers
1010
import com.openai.core.http.HttpClient
@@ -262,7 +262,7 @@ private constructor(
262262
// Default Azure OpenAI version is used if Azure user doesn't
263263
// specific a service API version in 'queryParams'.
264264
// We can update the default value every major announcement if needed.
265-
replaceQueryParams("api-version", (azureServiceVersion ?: V2024_06_01).value)
265+
replaceQueryParams("api-version", (azureServiceVersion ?: V2024_10_21).value)
266266
}
267267

268268
headers.replaceAll(this.headers.build())

0 commit comments

Comments
 (0)