Skip to content

Commit

Permalink
Update default API version from Azure OpenAI to 2024-08-01-preview (#162
Browse files Browse the repository at this point in the history
)
  • Loading branch information
marcominerva authored Sep 11, 2024
2 parents ebdc1e6 + 05d83cb commit 29a2c25
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ builder.Services.AddChatGpt(options =>
- 2023-05-15
- 2023-06-01-preview
- 2023-10-01-preview
- 2024-02-01
- 2024-02-15-preview
- 2024-03-01-preview
- 2024-04-01-preview
- 2024-05-01-preview
- 2024-02-01
- 2024-05-01-preview
- 2024-06-01
- 2024-07-01-preview (default)
- 2024-07-01-preview
- 2024-08-01-preview (default)
- _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").

### DefaultModel and DefaultEmbeddingModel
Expand Down
2 changes: 1 addition & 1 deletion samples/ChatGptApi/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ApiKey": "", // Required
//"Organization": "", // Optional, used only by OpenAI
"ResourceName": "", // Required when using Azure OpenAI Service
"ApiVersion": "2024-07-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-07-01-preview)
"ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview)
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory

"DefaultModel": "my-model",
Expand Down
2 changes: 1 addition & 1 deletion samples/ChatGptConsole/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ApiKey": "", // Required
//"Organization": "", // Optional, used only by OpenAI
"ResourceName": "", // Required when using Azure OpenAI Service
"ApiVersion": "2024-07-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-07-01-preview)
"ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview)
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory

"DefaultModel": "my-model",
Expand Down
2 changes: 1 addition & 1 deletion samples/ChatGptFunctionCallingConsole/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ApiKey": "", // Required
//"Organization": "", // Optional, used only by OpenAI
"ResourceName": "", // Required when using Azure OpenAI Service
"ApiVersion": "2024-07-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-07-01-preview)
"ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview)
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory

"DefaultModel": "my-model",
Expand Down
2 changes: 1 addition & 1 deletion samples/ChatGptStreamConsole/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ApiKey": "", // Required
//"Organization": "", // Optional, used only by OpenAI
"ResourceName": "", // Required when using Azure OpenAI Service
"ApiVersion": "2024-07-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-07-01-preview)
"ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview)
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory

"DefaultModel": "my-model",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ internal class AzureChatGptServiceConfiguration : ChatGptServiceConfiguration
/// <summary>
/// The default API version for Azure OpenAI service.
/// </summary>
public const string DefaultApiVersion = "2024-07-01-preview";
public const string DefaultApiVersion = "2024-08-01-preview";

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

/// <summary>
/// Gets or sets the API version of the Azure OpenAI service (Default: 2024-07-01-preview).
/// Gets or sets the API version of the Azure OpenAI service (Default: 2024-08-01-preview).
/// </summary>
/// <remarks>
/// Currently supported versions are:
Expand All @@ -36,6 +36,10 @@ internal class AzureChatGptServiceConfiguration : ChatGptServiceConfiguration
/// <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>
/// </item>
/// <item>
/// <term>2024-02-01</term>
/// <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>
/// </item>
/// <item>
/// <term>2024-02-15-preview</term>
/// <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>
/// </item>
Expand All @@ -52,17 +56,18 @@ internal class AzureChatGptServiceConfiguration : ChatGptServiceConfiguration
/// <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>
/// </item>
/// <item>
/// <term>2023-02-01</term>
/// <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>
/// </item>
/// <item>
/// <term>2024-06-01</term>
/// <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>
/// </item>
/// <item>
/// <term>2024-07-01-preview</term>
/// <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>
/// </item>/// </list>
/// </item>
/// <item>
/// <term>2024-08-01-preview</term>
/// <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>
/// </item>
/// </list>
/// </remarks>
public string ApiVersion { get; set; } = DefaultApiVersion;

Expand Down

0 comments on commit 29a2c25

Please sign in to comment.