Skip to content

Commit 29a2c25

Browse files
authored
Update default API version from Azure OpenAI to 2024-08-01-preview (#162)
2 parents ebdc1e6 + 05d83cb commit 29a2c25

File tree

6 files changed

+20
-14
lines changed

6 files changed

+20
-14
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ builder.Services.AddChatGpt(options =>
5656
- 2023-05-15
5757
- 2023-06-01-preview
5858
- 2023-10-01-preview
59+
- 2024-02-01
5960
- 2024-02-15-preview
6061
- 2024-03-01-preview
6162
- 2024-04-01-preview
62-
- 2024-05-01-preview
63-
- 2024-02-01
63+
- 2024-05-01-preview
6464
- 2024-06-01
65-
- 2024-07-01-preview (default)
65+
- 2024-07-01-preview
66+
- 2024-08-01-preview (default)
6667
- _AuthenticationType_: it specifies if the key is an actual API Key or an [Azure Active Directory token](https://learn.microsoft.com/azure/cognitive-services/openai/how-to/managed-identity) (optional, default: "ApiKey").
6768

6869
### DefaultModel and DefaultEmbeddingModel

samples/ChatGptApi/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"ApiKey": "", // Required
55
//"Organization": "", // Optional, used only by OpenAI
66
"ResourceName": "", // Required when using Azure OpenAI Service
7-
"ApiVersion": "2024-07-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-07-01-preview)
7+
"ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview)
88
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory
99

1010
"DefaultModel": "my-model",

samples/ChatGptConsole/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"ApiKey": "", // Required
55
//"Organization": "", // Optional, used only by OpenAI
66
"ResourceName": "", // Required when using Azure OpenAI Service
7-
"ApiVersion": "2024-07-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-07-01-preview)
7+
"ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview)
88
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory
99

1010
"DefaultModel": "my-model",

samples/ChatGptFunctionCallingConsole/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"ApiKey": "", // Required
55
//"Organization": "", // Optional, used only by OpenAI
66
"ResourceName": "", // Required when using Azure OpenAI Service
7-
"ApiVersion": "2024-07-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-07-01-preview)
7+
"ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview)
88
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory
99

1010
"DefaultModel": "my-model",

samples/ChatGptStreamConsole/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"ApiKey": "", // Required
55
//"Organization": "", // Optional, used only by OpenAI
66
"ResourceName": "", // Required when using Azure OpenAI Service
7-
"ApiVersion": "2024-07-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-07-01-preview)
7+
"ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview)
88
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory
99

1010
"DefaultModel": "my-model",

src/ChatGptNet/ServiceConfigurations/AzureChatGptServiceConfiguration.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ internal class AzureChatGptServiceConfiguration : ChatGptServiceConfiguration
1010
/// <summary>
1111
/// The default API version for Azure OpenAI service.
1212
/// </summary>
13-
public const string DefaultApiVersion = "2024-07-01-preview";
13+
public const string DefaultApiVersion = "2024-08-01-preview";
1414

1515
/// <summary>
1616
/// Gets or sets the name of the Azure OpenAI Resource.
1717
/// </summary>
1818
public string? ResourceName { get; set; }
1919

2020
/// <summary>
21-
/// Gets or sets the API version of the Azure OpenAI service (Default: 2024-07-01-preview).
21+
/// Gets or sets the API version of the Azure OpenAI service (Default: 2024-08-01-preview).
2222
/// </summary>
2323
/// <remarks>
2424
/// Currently supported versions are:
@@ -36,6 +36,10 @@ internal class AzureChatGptServiceConfiguration : ChatGptServiceConfiguration
3636
/// <description><see href="https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-10-01-preview/inference.json">Swagger spec</see></description>
3737
/// </item>
3838
/// <item>
39+
/// <term>2024-02-01</term>
40+
/// <description><see href="https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2024-02-01/inference.json">Swagger spec</see></description>
41+
/// </item>
42+
/// <item>
3943
/// <term>2024-02-15-preview</term>
4044
/// <description><see href="https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-02-15-preview/inference.json">Swagger spec</see></description>
4145
/// </item>
@@ -52,17 +56,18 @@ internal class AzureChatGptServiceConfiguration : ChatGptServiceConfiguration
5256
/// <description><see href="https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-05-01-preview/inference.json">Swagger spec</see></description>
5357
/// </item>
5458
/// <item>
55-
/// <term>2023-02-01</term>
56-
/// <description><see href="https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2024-02-01/inference.json">Swagger spec</see></description>
57-
/// </item>
58-
/// <item>
5959
/// <term>2024-06-01</term>
6060
/// <description><see href="https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2024-06-01/inference.json">Swagger spec</see></description>
6161
/// </item>
6262
/// <item>
6363
/// <term>2024-07-01-preview</term>
6464
/// <description><see href="https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-07-01-preview/inference.json">Swagger spec</see></description>
65-
/// </item>/// </list>
65+
/// </item>
66+
/// <item>
67+
/// <term>2024-08-01-preview</term>
68+
/// <description><see href="https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-08-01-preview/inference.json">Swagger spec</see></description>
69+
/// </item>
70+
/// </list>
6671
/// </remarks>
6772
public string ApiVersion { get; set; } = DefaultApiVersion;
6873

0 commit comments

Comments
 (0)