From b62a325b0af8ac7eb887667b64279ccbecaf65c4 Mon Sep 17 00:00:00 2001 From: Takahiro Ikeuchi Date: Sat, 20 May 2023 04:04:16 +0900 Subject: [PATCH] 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 --- api_internal_test.go | 4 ++-- config.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api_internal_test.go b/api_internal_test.go index 529e7c7..214b627 100644 --- a/api_internal_test.go +++ b/api_internal_test.go @@ -122,7 +122,7 @@ func TestAzureFullURL(t *testing.T) { "chatgpt-demo", "https://httpbin.org/" + "openai/deployments/chatgpt-demo" + - "/chat/completions?api-version=2023-03-15-preview", + "/chat/completions?api-version=2023-05-15", }, { "AzureBaseURLWithoutSlashOK", @@ -131,7 +131,7 @@ func TestAzureFullURL(t *testing.T) { "chatgpt-demo", "https://httpbin.org/" + "openai/deployments/chatgpt-demo" + - "/chat/completions?api-version=2023-03-15-preview", + "/chat/completions?api-version=2023-05-15", }, } diff --git a/config.go b/config.go index fbcf377..c58b71e 100644 --- a/config.go +++ b/config.go @@ -56,7 +56,7 @@ func DefaultAzureConfig(apiKey, baseURL string) ClientConfig { BaseURL: baseURL, OrgID: "", APIType: APITypeAzure, - APIVersion: "2023-03-15-preview", + APIVersion: "2023-05-15", AzureModelMapperFunc: func(model string) string { return regexp.MustCompile(`[.:]`).ReplaceAllString(model, "") },