Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libraries #159

Merged
merged 3 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ builder.Services.AddChatGpt(options =>
- 2023-10-01-preview
- 2024-02-15-preview
- 2024-03-01-preview
- 2024-04-01-preview (default)
- 2024-04-01-preview
- 2024-05-01-preview (default)
- 2024-02-01
- _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").

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Configures Azure OpenAI Service settings.

```csharp
public static ChatGptOptionsBuilder UseAzure(this ChatGptOptionsBuilder builder,
string resourceName, string apiKey, string apiVersion = "2024-04-01-preview",
string resourceName, string apiKey, string apiVersion = "2024-05-01-preview",
AzureAuthenticationType authenticationType = AzureAuthenticationType.ApiKey)
```

Expand Down
8 changes: 4 additions & 4 deletions samples/ChatGptApi/ChatGptApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.5" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.5.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
<PackageReference Include="Polly.Extensions" Version="8.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.1" />
<PackageReference Include="TinyHelpers.AspNetCore" Version="3.1.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="TinyHelpers.AspNetCore" Version="3.1.6" />
</ItemGroup>

<ItemGroup>
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-04-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-04-01-preview)
"ApiVersion": "2024-05-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-05-01-preview)
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory

"DefaultModel": "my-model",
Expand Down
6 changes: 3 additions & 3 deletions samples/ChatGptBlazor.Wasm/ChatGptBlazor.Wasm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

<ItemGroup>
<PackageReference Include="Markdig" Version="0.37.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.5" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.6" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
<PackageReference Include="Polly.Extensions" Version="8.4.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion samples/ChatGptConsole/ChatGptConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.5.0" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
<PackageReference Include="Polly.Extensions" Version="8.4.0" />
</ItemGroup>

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-04-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-04-01-preview)
"ApiVersion": "2024-05-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-05-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 @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.5.0" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
<PackageReference Include="Polly.Extensions" Version="8.4.0" />
</ItemGroup>

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-04-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-04-01-preview)
"ApiVersion": "2024-05-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-05-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/ChatGptStreamConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.5.0" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
<PackageReference Include="Polly.Extensions" Version="8.4.0" />
</ItemGroup>

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-04-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-04-01-preview)
"ApiVersion": "2024-05-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-05-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-04-01-preview";
public const string DefaultApiVersion = "2024-05-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-04-01-preview).
/// Gets or sets the API version of the Azure OpenAI service (Default: 2024-05-01-preview).
/// </summary>
/// <remarks>
/// Currently supported versions are:
Expand Down Expand Up @@ -48,6 +48,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/2024-04-01-preview/inference.json">Swagger spec</see></description>
/// </item>
/// <item>
/// <term>2024-05-01-preview</term>
/// <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>
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="All" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.139" PrivateAssets="All" />
</ItemGroup>

</Project>
Loading