Skip to content

Commit ade19ba

Browse files
feat: update default API version for Azure OpenAI (songquanpeng#994)
* feat: Update default API version for Azure OpenAI. * chore: update other theme --------- Co-authored-by: JustSong <[email protected]>
1 parent 4d86d02 commit ade19ba

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

relay/controller/image.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func RelayImageHelper(c *gin.Context, relayMode int) *relaymodel.ErrorWithStatus
6161
if meta.ChannelType == common.ChannelTypeAzure {
6262
// https://learn.microsoft.com/en-us/azure/ai-services/openai/dall-e-quickstart?tabs=dalle3%2Ccommand-line&pivots=rest-api
6363
apiVersion := util.GetAzureAPIVersion(c)
64-
// https://{resource_name}.openai.azure.com/openai/deployments/dall-e-3/images/generations?api-version=2023-06-01-preview
64+
// https://{resource_name}.openai.azure.com/openai/deployments/dall-e-3/images/generations?api-version=2024-03-01-preview
6565
fullRequestURL = fmt.Sprintf("%s/openai/deployments/%s/images/generations?api-version=%s", meta.BaseURL, imageRequest.Model, apiVersion)
6666
}
6767

web/air/src/pages/Channel/EditChannel.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const EditChannel = (props) => {
230230
localInputs.base_url = localInputs.base_url.slice(0, localInputs.base_url.length - 1);
231231
}
232232
if (localInputs.type === 3 && localInputs.other === '') {
233-
localInputs.other = '2023-06-01-preview';
233+
localInputs.other = '2024-03-01-preview';
234234
}
235235
if (localInputs.type === 18 && localInputs.other === '') {
236236
localInputs.other = 'v2.1';
@@ -348,7 +348,7 @@ const EditChannel = (props) => {
348348
<Input
349349
label='默认 API 版本'
350350
name='azure_other'
351-
placeholder={'请输入默认 API 版本,例如:2023-06-01-preview,该配置可以被实际的请求查询参数所覆盖'}
351+
placeholder={'请输入默认 API 版本,例如:2024-03-01-preview,该配置可以被实际的请求查询参数所覆盖'}
352352
onChange={value => {
353353
handleInputChange('other', value)
354354
}}

web/berry/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const typeConfig = {
4949
base_url: "请填写AZURE_OPENAI_ENDPOINT",
5050

5151
// 注意:通过判断 `other` 是否有值来判断是否需要显示 `other` 输入框, 默认是没有值的
52-
other: "请输入默认API版本,例如:2023-06-01-preview",
52+
other: "请输入默认API版本,例如:2024-03-01-preview",
5353
},
5454
modelGroup: "openai", // 模型组名称,这个值是给 填入渠道支持模型 按钮使用的。 填入渠道支持模型 按钮会根据这个值来获取模型组,如果填写默认是 openai
5555
},

web/berry/src/views/Channel/type/Config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const typeConfig = {
4141
},
4242
prompt: {
4343
base_url: "请填写AZURE_OPENAI_ENDPOINT",
44-
other: "请输入默认API版本,例如:2023-06-01-preview",
44+
other: "请输入默认API版本,例如:2024-03-01-preview",
4545
},
4646
},
4747
11: {

web/default/src/pages/Channel/EditChannel.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const EditChannel = () => {
160160
localInputs.base_url = localInputs.base_url.slice(0, localInputs.base_url.length - 1);
161161
}
162162
if (localInputs.type === 3 && localInputs.other === '') {
163-
localInputs.other = '2023-06-01-preview';
163+
localInputs.other = '2024-03-01-preview';
164164
}
165165
if (localInputs.type === 18 && localInputs.other === '') {
166166
localInputs.other = 'v2.1';
@@ -242,7 +242,7 @@ const EditChannel = () => {
242242
<Form.Input
243243
label='默认 API 版本'
244244
name='other'
245-
placeholder={'请输入默认 API 版本,例如:2023-06-01-preview,该配置可以被实际的请求查询参数所覆盖'}
245+
placeholder={'请输入默认 API 版本,例如:2024-03-01-preview,该配置可以被实际的请求查询参数所覆盖'}
246246
onChange={handleInputChange}
247247
value={inputs.other}
248248
autoComplete='new-password'

0 commit comments

Comments
 (0)