Azure OpenAI API version 2023-05-15 (#316)
* chore(config.go): update Azure API version to 2023-05-15 to use the latest version available * chore(api_internal_test.go): update Azure API version to 2023-05-15 to match the latest version
This commit is contained in:
@@ -122,7 +122,7 @@ func TestAzureFullURL(t *testing.T) {
|
|||||||
"chatgpt-demo",
|
"chatgpt-demo",
|
||||||
"https://httpbin.org/" +
|
"https://httpbin.org/" +
|
||||||
"openai/deployments/chatgpt-demo" +
|
"openai/deployments/chatgpt-demo" +
|
||||||
"/chat/completions?api-version=2023-03-15-preview",
|
"/chat/completions?api-version=2023-05-15",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"AzureBaseURLWithoutSlashOK",
|
"AzureBaseURLWithoutSlashOK",
|
||||||
@@ -131,7 +131,7 @@ func TestAzureFullURL(t *testing.T) {
|
|||||||
"chatgpt-demo",
|
"chatgpt-demo",
|
||||||
"https://httpbin.org/" +
|
"https://httpbin.org/" +
|
||||||
"openai/deployments/chatgpt-demo" +
|
"openai/deployments/chatgpt-demo" +
|
||||||
"/chat/completions?api-version=2023-03-15-preview",
|
"/chat/completions?api-version=2023-05-15",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ func DefaultAzureConfig(apiKey, baseURL string) ClientConfig {
|
|||||||
BaseURL: baseURL,
|
BaseURL: baseURL,
|
||||||
OrgID: "",
|
OrgID: "",
|
||||||
APIType: APITypeAzure,
|
APIType: APITypeAzure,
|
||||||
APIVersion: "2023-03-15-preview",
|
APIVersion: "2023-05-15",
|
||||||
AzureModelMapperFunc: func(model string) string {
|
AzureModelMapperFunc: func(model string) string {
|
||||||
return regexp.MustCompile(`[.:]`).ReplaceAllString(model, "")
|
return regexp.MustCompile(`[.:]`).ReplaceAllString(model, "")
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user