diff --git a/README.md b/README.md index b5b2ae3..d260fdb 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,8 @@ builder.Services.AddChatGpt(options => - 2024-05-01-preview - 2024-06-01 - 2024-07-01-preview - - 2024-08-01-preview (default) + - 2024-08-01-preview + - 2024-09-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 @@ -147,7 +148,7 @@ The configuration can be automatically read from [IConfiguration](https://learn. "ApiKey": "", // Required //"Organization": "", // Optional, used only by OpenAI "ResourceName": "", // Required when using Azure OpenAI Service - "ApiVersion": "2024-06-01", // Optional, used only by Azure OpenAI Service (default: 2024-06-01) + "ApiVersion": "2024-09-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-09-01-preview) "AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory "DefaultModel": "my-model", diff --git a/samples/ChatGptApi/ChatGptApi.csproj b/samples/ChatGptApi/ChatGptApi.csproj index 4d2306e..982e462 100644 --- a/samples/ChatGptApi/ChatGptApi.csproj +++ b/samples/ChatGptApi/ChatGptApi.csproj @@ -7,10 +7,10 @@ - - - - + + + + diff --git a/samples/ChatGptApi/appsettings.json b/samples/ChatGptApi/appsettings.json index e99b998..6c3b32b 100644 --- a/samples/ChatGptApi/appsettings.json +++ b/samples/ChatGptApi/appsettings.json @@ -4,7 +4,7 @@ "ApiKey": "", // Required //"Organization": "", // Optional, used only by OpenAI "ResourceName": "", // Required when using Azure OpenAI Service - "ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview) + "ApiVersion": "2024-09-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-09-01-preview) "AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory "DefaultModel": "my-model", diff --git a/samples/ChatGptBlazor.Wasm/ChatGptBlazor.Wasm.csproj b/samples/ChatGptBlazor.Wasm/ChatGptBlazor.Wasm.csproj index 6c8a19a..c062d86 100644 --- a/samples/ChatGptBlazor.Wasm/ChatGptBlazor.Wasm.csproj +++ b/samples/ChatGptBlazor.Wasm/ChatGptBlazor.Wasm.csproj @@ -9,9 +9,9 @@ - - - + + + diff --git a/samples/ChatGptConsole/ChatGptConsole.csproj b/samples/ChatGptConsole/ChatGptConsole.csproj index 1060328..50ebbb9 100644 --- a/samples/ChatGptConsole/ChatGptConsole.csproj +++ b/samples/ChatGptConsole/ChatGptConsole.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/samples/ChatGptConsole/appsettings.json b/samples/ChatGptConsole/appsettings.json index 2406bcc..c821d06 100644 --- a/samples/ChatGptConsole/appsettings.json +++ b/samples/ChatGptConsole/appsettings.json @@ -4,14 +4,14 @@ "ApiKey": "", // Required //"Organization": "", // Optional, used only by OpenAI "ResourceName": "", // Required when using Azure OpenAI Service - "ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview) + "ApiVersion": "2024-09-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-09-01-preview) "AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory "DefaultModel": "my-model", - "DefaultEmbeddingModel": "text-embedding-ada-002", // Optional, it set if you want to use embeddings + "DefaultEmbeddingModel": "text-embedding-ada-002", // Optional, set it if you want to use embeddings "MessageLimit": 20, "MessageExpiration": "00:30:00", - "ThrowExceptionOnError": true + "ThrowExceptionOnError": true // Optional, default: true //"User": "UserName", //"DefaultParameters": { // "Temperature": 0.8, @@ -20,7 +20,7 @@ // "PresencePenalty": 0, // "FrequencyPenalty": 0, // "ResponseFormat": { "Type": "text" }, // Allowed values for Type: text (default) or json_object - // "Seed": 42 // Optional (any integer value) + // "Seed": 42 // Optional (any integer value) //}, //"DefaultEmbeddingParameters": { // "Dimensions": 1536 diff --git a/samples/ChatGptFunctionCallingConsole/ChatGptFunctionCallingConsole.csproj b/samples/ChatGptFunctionCallingConsole/ChatGptFunctionCallingConsole.csproj index 3f88e1e..d801c8d 100644 --- a/samples/ChatGptFunctionCallingConsole/ChatGptFunctionCallingConsole.csproj +++ b/samples/ChatGptFunctionCallingConsole/ChatGptFunctionCallingConsole.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/samples/ChatGptFunctionCallingConsole/appsettings.json b/samples/ChatGptFunctionCallingConsole/appsettings.json index 386819d..c821d06 100644 --- a/samples/ChatGptFunctionCallingConsole/appsettings.json +++ b/samples/ChatGptFunctionCallingConsole/appsettings.json @@ -4,11 +4,11 @@ "ApiKey": "", // Required //"Organization": "", // Optional, used only by OpenAI "ResourceName": "", // Required when using Azure OpenAI Service - "ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview) + "ApiVersion": "2024-09-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-09-01-preview) "AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory "DefaultModel": "my-model", - "DefaultEmbeddingModel": "text-embedding-ada-002", // Optional, it set if you want to use embeddings + "DefaultEmbeddingModel": "text-embedding-ada-002", // Optional, set it if you want to use embeddings "MessageLimit": 20, "MessageExpiration": "00:30:00", "ThrowExceptionOnError": true // Optional, default: true diff --git a/samples/ChatGptStreamConsole/ChatGptStreamConsole.csproj b/samples/ChatGptStreamConsole/ChatGptStreamConsole.csproj index 72ae019..2a53752 100644 --- a/samples/ChatGptStreamConsole/ChatGptStreamConsole.csproj +++ b/samples/ChatGptStreamConsole/ChatGptStreamConsole.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/samples/ChatGptStreamConsole/appsettings.json b/samples/ChatGptStreamConsole/appsettings.json index e7f6b0e..720693d 100644 --- a/samples/ChatGptStreamConsole/appsettings.json +++ b/samples/ChatGptStreamConsole/appsettings.json @@ -4,7 +4,7 @@ "ApiKey": "", // Required //"Organization": "", // Optional, used only by OpenAI "ResourceName": "", // Required when using Azure OpenAI Service - "ApiVersion": "2024-08-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-08-01-preview) + "ApiVersion": "2024-09-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-09-01-preview) "AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory "DefaultModel": "my-model", diff --git a/src/ChatGptNet/ChatGptNet.csproj b/src/ChatGptNet/ChatGptNet.csproj index 29a6435..98069f2 100644 --- a/src/ChatGptNet/ChatGptNet.csproj +++ b/src/ChatGptNet/ChatGptNet.csproj @@ -26,7 +26,7 @@ - + @@ -40,10 +40,10 @@ - + - - + + diff --git a/src/ChatGptNet/ServiceConfigurations/AzureChatGptServiceConfiguration.cs b/src/ChatGptNet/ServiceConfigurations/AzureChatGptServiceConfiguration.cs index 793fb9b..8ffb898 100644 --- a/src/ChatGptNet/ServiceConfigurations/AzureChatGptServiceConfiguration.cs +++ b/src/ChatGptNet/ServiceConfigurations/AzureChatGptServiceConfiguration.cs @@ -10,7 +10,7 @@ internal class AzureChatGptServiceConfiguration : ChatGptServiceConfiguration /// /// The default API version for Azure OpenAI service. /// - public const string DefaultApiVersion = "2024-08-01-preview"; + public const string DefaultApiVersion = "2024-09-01-preview"; /// /// Gets or sets the name of the Azure OpenAI Resource. @@ -18,7 +18,7 @@ internal class AzureChatGptServiceConfiguration : ChatGptServiceConfiguration public string? ResourceName { get; set; } /// - /// Gets or sets the API version of the Azure OpenAI service (Default: 2024-08-01-preview). + /// Gets or sets the API version of the Azure OpenAI service (Default: 2024-09-01-preview). /// /// /// Currently supported versions are: @@ -67,6 +67,10 @@ internal class AzureChatGptServiceConfiguration : ChatGptServiceConfiguration /// 2024-08-01-preview /// Swagger spec /// + /// + /// 2024-09-01-preview + /// Swagger spec + /// /// /// public string ApiVersion { get; set; } = DefaultApiVersion;