Skip to content

Commit a7dcc7e

Browse files
committed
chore: update default API version for Azure
service provider
1 parent a1ea2a3 commit a7dcc7e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/info.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434
"identifier": "apiVersion",
3535
"type": "text",
3636
"title": "API Version",
37+
"defaultValue": "2023-03-15-preview",
3738
"desc": "可选项。此值为在使用 Azure 模型时采用的 Chat completions API 版本,不支持 2023-03-15-preview 之前的版本",
3839
"textConfig": {
3940
"type": "visible",
40-
"placeholderText": "2023-08-01-preview"
41+
"placeholderText": "2023-03-15-preview"
4142
}
4243
},
4344
{

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ function translate(query) {
293293

294294
const baseUrl = ensureHttpsAndNoTrailingSlash(apiUrl || "https://api.openai.com");
295295
let apiUrlPath = baseUrl.includes("gateway.ai.cloudflare.com") ? "/chat/completions" : "/v1/chat/completions";
296-
const apiVersionQuery = apiVersion ? `?api-version=${apiVersion}` : "?api-version=2023-08-01-preview";
296+
const apiVersionQuery = apiVersion ? `?api-version=${apiVersion}` : "?api-version=2023-03-15-preview";
297297

298298
const isAzureServiceProvider = baseUrl.includes("openai.azure.com");
299299
if (isAzureServiceProvider) {

0 commit comments

Comments
 (0)