Skip to content

Commit 23b2782

Browse files
authored
Misc upgrades (#1213)
* Upgrade Semantic Kernel * Upgrade Kernel Memory * Fix Github plugin * Handle OpenAI plugins deprecation * Cleanup code, refactoring, code style
1 parent 046c539 commit 23b2782

File tree

95 files changed

+618
-736
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+618
-736
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dotnet/.config
1111
*.user
1212
*.userosscache
1313
*.sln.docstates
14+
webapi/data/*.json
15+
__dev/
1416

1517
# User-specific files (MonoDevelop/Xamarin Studio)
1618
*.userprefs

CopilotChat.sln.DotSettings

+1
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ public void It$SOMENAME$()
289289
<s:Boolean x:Key="/Default/UserDictionary/Words/=subdir/@EntryIndexedValue">True</s:Boolean>
290290
<s:Boolean x:Key="/Default/UserDictionary/Words/=SVCS/@EntryIndexedValue">True</s:Boolean>
291291
<s:Boolean x:Key="/Default/UserDictionary/Words/=syntaxes/@EntryIndexedValue">True</s:Boolean>
292+
<s:Boolean x:Key="/Default/UserDictionary/Words/=tesseract/@EntryIndexedValue">True</s:Boolean>
292293
<s:Boolean x:Key="/Default/UserDictionary/Words/=testsettings/@EntryIndexedValue">True</s:Boolean>
293294
<s:Boolean x:Key="/Default/UserDictionary/Words/=tiktoken/@EntryIndexedValue">True</s:Boolean>
294295
<s:Boolean x:Key="/Default/UserDictionary/Words/=tldr/@EntryIndexedValue">True</s:Boolean>

Directory.Build.props

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<Project>
2+
<PropertyGroup>
3+
<!-- C# lang version, https://learn.microsoft.com/dotnet/csharp/whats-new -->
4+
<LangVersion>12</LangVersion>
5+
6+
<!-- https://learn.microsoft.com/dotnet/core/tools/global-json#rollforward -->
7+
<RollForward>LatestMajor</RollForward>
8+
9+
<!-- https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/nullable-value-types -->
10+
<Nullable>enable</Nullable>
11+
12+
<!-- https://devblogs.microsoft.com/dotnet/welcome-to-csharp-10 -->
13+
<ImplicitUsings>enable</ImplicitUsings>
14+
15+
<IsPackable>false</IsPackable>
16+
<AnalysisMode>All</AnalysisMode>
17+
<NoWarn>CA1812,CA2234,CS1570,CS1572,CS1573,CS1574,CA1056,CA1716,CA1724,SKEXP0003,SKEXP0011,SKEXP0021,SKEXP0026,SKEXP0042,SKEXP0050,SKEXP0052,SKEXP0053,SKEXP0060,KMEXP02,SKEXP0040</NoWarn>
18+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
19+
</PropertyGroup>
20+
21+
<ItemGroup>
22+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
23+
<PrivateAssets>all</PrivateAssets>
24+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
25+
</PackageReference>
26+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle">
27+
<PrivateAssets>all</PrivateAssets>
28+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
29+
</PackageReference>
30+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers">
31+
<PrivateAssets>all</PrivateAssets>
32+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
33+
</PackageReference>
34+
<PackageReference Include="Roslynator.Analyzers">
35+
<PrivateAssets>all</PrivateAssets>
36+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
37+
</PackageReference>
38+
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers">
39+
<PrivateAssets>all</PrivateAssets>
40+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
41+
</PackageReference>
42+
<PackageReference Include="Roslynator.Formatting.Analyzers">
43+
<PrivateAssets>all</PrivateAssets>
44+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
45+
</PackageReference>
46+
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers">
47+
<PrivateAssets>all</PrivateAssets>
48+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
49+
</PackageReference>
50+
</ItemGroup>
51+
</Project>

Directory.Packages.props

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.3.2" />
7+
<PackageVersion Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
8+
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.45.1" />
9+
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
10+
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
11+
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
12+
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
13+
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
14+
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" />
15+
<PackageVersion Include="Microsoft.Identity.Client" Version="4.66.2" />
16+
<PackageVersion Include="Microsoft.Identity.Web" Version="2.21.1" />
17+
<PackageVersion Include="SharpToken" Version="2.0.3" />
18+
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.9.0" />
19+
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
20+
<PackageVersion Include="Tesseract" Version="5.2.0" />
21+
</ItemGroup>
22+
<ItemGroup>
23+
<!-- Make sure the app is thoroughly tested after any Microsoft.Azure.Functions.* package updates. -->
24+
<PackageVersion Include="Microsoft.Azure.Functions.Worker" Version="1.23.0" />
25+
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
26+
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.OpenApi" Version="1.5.1" />
27+
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.18.1" />
28+
</ItemGroup>
29+
<ItemGroup>
30+
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.28.0" />
31+
<PackageVersion Include="Microsoft.SemanticKernel.Abstractions" Version="1.28.0" />
32+
</ItemGroup>
33+
<ItemGroup>
34+
<PackageVersion Include="Microsoft.SemanticKernel.Connectors.AzureAISearch" Version="1.28.0-preview" />
35+
<PackageVersion Include="Microsoft.SemanticKernel.Connectors.Qdrant" Version="1.28.0-preview" />
36+
</ItemGroup>
37+
<ItemGroup>
38+
<PackageVersion Include="Microsoft.SemanticKernel.Plugins.Core" Version="1.28.0-alpha" />
39+
<PackageVersion Include="Microsoft.SemanticKernel.Plugins.Memory" Version="1.28.0-alpha" />
40+
<PackageVersion Include="Microsoft.SemanticKernel.Plugins.MsGraph" Version="1.28.0-alpha" />
41+
<PackageVersion Include="Microsoft.SemanticKernel.Plugins.OpenApi" Version="1.28.0-alpha" />
42+
<PackageVersion Include="Microsoft.SemanticKernel.Plugins.Web" Version="1.28.0-alpha" />
43+
</ItemGroup>
44+
<ItemGroup>
45+
<PackageVersion Include="Microsoft.KernelMemory.AI.AzureOpenAI" Version="0.92.241112.1" />
46+
<PackageVersion Include="Microsoft.KernelMemory.AI.Ollama" Version="0.92.241112.1" />
47+
<PackageVersion Include="Microsoft.KernelMemory.AI.OpenAI" Version="0.92.241112.1" />
48+
<PackageVersion Include="Microsoft.KernelMemory.Abstractions" Version="0.92.241112.1" />
49+
<PackageVersion Include="Microsoft.KernelMemory.Core" Version="0.92.241112.1" />
50+
<PackageVersion Include="Microsoft.KernelMemory.DataFormats.AzureAIDocIntel" Version="0.92.241112.1" />
51+
<PackageVersion Include="Microsoft.KernelMemory.DocumentStorage.AzureBlobs" Version="0.92.241112.1" />
52+
<PackageVersion Include="Microsoft.KernelMemory.MemoryDb.AzureAISearch" Version="0.92.241112.1" />
53+
<PackageVersion Include="Microsoft.KernelMemory.MemoryDb.Postgres" Version="0.92.241112.1" />
54+
<PackageVersion Include="Microsoft.KernelMemory.MemoryDb.Qdrant" Version="0.92.241112.1" />
55+
<PackageVersion Include="Microsoft.KernelMemory.MemoryDb.SQLServer" Version="0.92.241112.1" />
56+
<PackageVersion Include="Microsoft.KernelMemory.Orchestration.AzureQueues" Version="0.92.241112.1" />
57+
<PackageVersion Include="Microsoft.KernelMemory.Orchestration.RabbitMQ" Version="0.92.241112.1" />
58+
</ItemGroup>
59+
<ItemGroup>
60+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
61+
<PackageVersion Include="xunit" Version="2.9.2" />
62+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2">
63+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
64+
<PrivateAssets>all</PrivateAssets>
65+
</PackageVersion>
66+
<PackageVersion Include="coverlet.collector" Version="6.0.2">
67+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
68+
<PrivateAssets>all</PrivateAssets>
69+
</PackageVersion>
70+
</ItemGroup>
71+
<!-- Code Analysis -->
72+
<ItemGroup>
73+
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0">
74+
<PrivateAssets>all</PrivateAssets>
75+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
76+
</PackageVersion>
77+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.11.0">
78+
<PrivateAssets>all</PrivateAssets>
79+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
80+
</PackageVersion>
81+
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
82+
<PrivateAssets>all</PrivateAssets>
83+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
84+
</PackageVersion>
85+
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.9">
86+
<PrivateAssets>all</PrivateAssets>
87+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
88+
</PackageVersion>
89+
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.9">
90+
<PrivateAssets>all</PrivateAssets>
91+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
92+
</PackageVersion>
93+
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.12.9">
94+
<PrivateAssets>all</PrivateAssets>
95+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
96+
</PackageVersion>
97+
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.12.19">
98+
<PrivateAssets>all</PrivateAssets>
99+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
100+
</PackageVersion>
101+
</ItemGroup>
102+
</Project>

integration-tests/ChatCopilotIntegrationTest.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System;
4-
using System.Linq;
5-
using System.Net.Http;
63
using System.Net.Http.Headers;
7-
using System.Threading.Tasks;
84
using Microsoft.Extensions.Configuration;
95
using Microsoft.Identity.Client;
106
using Xunit;
@@ -15,6 +11,7 @@ namespace ChatCopilotIntegrationTests;
1511
/// Base class for Chat Copilot integration tests
1612
/// </summary>
1713
[Trait("Category", "Integration Tests")]
14+
#pragma warning disable CA1051
1815
public abstract class ChatCopilotIntegrationTest : IDisposable
1916
{
2017
protected const string BaseUrlSettingName = "BaseServerUrl";
@@ -76,7 +73,7 @@ protected async Task<string> GetUserTokenByPasswordAsync()
7673
string? scopeString = this.Configuration[ScopesSettingName];
7774
Assert.NotNull(scopeString);
7875

79-
string[] scopes = scopeString.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);
76+
string[] scopes = scopeString.Split([',', ' '], StringSplitOptions.RemoveEmptyEntries);
8077

8178
var accounts = await app.GetAccountsAsync();
8279

integration-tests/ChatCopilotIntegrationTests.csproj

+16-31
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,35 @@
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<IsPackable>false</IsPackable>
75
<IsTestProject>true</IsTestProject>
86
<UserSecretsId>81136671-a63f-4f20-bd0e-a65b2561999a</UserSecretsId>
97
</PropertyGroup>
108

119
<ItemGroup>
12-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
15-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
16-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" />
17-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
18-
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20">
19-
<PrivateAssets>all</PrivateAssets>
20-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
21-
</PackageReference>
22-
<PackageReference Include="Roslynator.Analyzers" Version="4.12.9">
23-
<PrivateAssets>all</PrivateAssets>
24-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
25-
</PackageReference>
26-
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.9">
27-
<PrivateAssets>all</PrivateAssets>
28-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
29-
</PackageReference>
30-
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.12.9">
31-
<PrivateAssets>all</PrivateAssets>
32-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
33-
</PackageReference>
34-
<PackageReference Include="xunit" Version="2.9.2" />
35-
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
10+
<ProjectReference Include="..\webapi\CopilotChatWebApi.csproj" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<PackageReference Include="Microsoft.Extensions.Configuration" />
15+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" />
16+
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />
17+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
18+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" />
19+
</ItemGroup>
20+
21+
<ItemGroup>
22+
<PackageReference Include="Microsoft.NET.Test.Sdk" />
23+
<PackageReference Include="xunit" />
24+
<PackageReference Include="xunit.runner.visualstudio">
3625
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3726
<PrivateAssets>all</PrivateAssets>
3827
</PackageReference>
39-
<PackageReference Include="coverlet.collector" Version="6.0.2">
28+
<PackageReference Include="coverlet.collector">
4029
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4130
<PrivateAssets>all</PrivateAssets>
4231
</PackageReference>
4332
</ItemGroup>
4433

45-
<ItemGroup>
46-
<ProjectReference Include="..\webapi\CopilotChatWebApi.csproj" />
47-
</ItemGroup>
48-
4934
<ItemGroup>
5035
<None Update="testsettings.json">
5136
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

integration-tests/ChatTests.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Collections.Generic;
4-
using System.Net.Http;
53
using System.Net.Http.Json;
64
using System.Text.Json;
75
using CopilotChat.WebApi.Models.Request;
@@ -13,6 +11,8 @@ namespace ChatCopilotIntegrationTests;
1311

1412
public class ChatTests : ChatCopilotIntegrationTest
1513
{
14+
private static readonly JsonSerializerOptions jsOpts = new() { PropertyNameCaseInsensitive = true };
15+
1616
[Fact]
1717
public async void ChatMessagePostSucceedsWithValidInput()
1818
{
@@ -24,7 +24,7 @@ public async void ChatMessagePostSucceedsWithValidInput()
2424
response.EnsureSuccessStatusCode();
2525

2626
var contentStream = await response.Content.ReadAsStreamAsync();
27-
var createChatResponse = await JsonSerializer.DeserializeAsync<CreateChatResponse>(contentStream, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
27+
var createChatResponse = await JsonSerializer.DeserializeAsync<CreateChatResponse>(contentStream, jsOpts);
2828
Assert.NotNull(createChatResponse);
2929

3030
// Ask something to the bot
@@ -37,12 +37,12 @@ public async void ChatMessagePostSucceedsWithValidInput()
3737
response.EnsureSuccessStatusCode();
3838

3939
contentStream = await response.Content.ReadAsStreamAsync();
40-
var askResult = await JsonSerializer.DeserializeAsync<AskResult>(contentStream, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
40+
var askResult = await JsonSerializer.DeserializeAsync<AskResult>(contentStream, jsOpts);
4141
Assert.NotNull(askResult);
4242
Assert.False(string.IsNullOrEmpty(askResult.Value));
4343

4444
// Clean up
45-
response = await this.HTTPClient.DeleteAsync($"chats/{createChatResponse.ChatSession.Id}");
45+
response = await this.HTTPClient.DeleteAsync($"chats/{createChatResponse.ChatSession.Id}").ConfigureAwait(false);
4646
response.EnsureSuccessStatusCode();
4747
}
4848
}

integration-tests/HealthzTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Net.Http;
43
using Xunit;
54

65
namespace ChatCopilotIntegrationTests;

integration-tests/ServiceInfoTests.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Net.Http;
43
using System.Text.Json;
54
using CopilotChat.WebApi.Models.Response;
65
using CopilotChat.WebApi.Options;
@@ -10,6 +9,8 @@ namespace ChatCopilotIntegrationTests;
109

1110
public class ServiceInfoTests : ChatCopilotIntegrationTest
1211
{
12+
private static readonly JsonSerializerOptions jsonOptions = new() { PropertyNameCaseInsensitive = true };
13+
1314
[Fact]
1415
public async void GetServiceInfo()
1516
{
@@ -19,7 +20,7 @@ public async void GetServiceInfo()
1920
response.EnsureSuccessStatusCode();
2021

2122
var contentStream = await response.Content.ReadAsStreamAsync();
22-
var objectFromResponse = await JsonSerializer.DeserializeAsync<ServiceInfoResponse>(contentStream, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
23+
var objectFromResponse = await JsonSerializer.DeserializeAsync<ServiceInfoResponse>(contentStream, jsonOptions);
2324

2425
Assert.NotNull(objectFromResponse);
2526
Assert.False(string.IsNullOrEmpty(objectFromResponse.MemoryStore.SelectedType));
@@ -33,7 +34,7 @@ public async void GetAuthConfig()
3334
response.EnsureSuccessStatusCode();
3435

3536
var contentStream = await response.Content.ReadAsStreamAsync();
36-
var objectFromResponse = await JsonSerializer.DeserializeAsync<FrontendAuthConfig>(contentStream, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
37+
var objectFromResponse = await JsonSerializer.DeserializeAsync<FrontendAuthConfig>(contentStream, jsonOptions);
3738

3839
Assert.NotNull(objectFromResponse);
3940
Assert.Equal(ChatAuthenticationOptions.AuthenticationType.AzureAd.ToString(), objectFromResponse.AuthType);

integration-tests/SpeechTokenTests.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Net.Http;
43
using System.Text.Json;
54
using CopilotChat.WebApi.Models.Response;
65
using Xunit;
@@ -9,6 +8,8 @@ namespace ChatCopilotIntegrationTests;
98

109
public class SpeechTokenTests : ChatCopilotIntegrationTest
1110
{
11+
private static readonly JsonSerializerOptions jsonOpts = new() { PropertyNameCaseInsensitive = true };
12+
1213
[Fact]
1314
public async void GetSpeechToken()
1415
{
@@ -18,7 +19,7 @@ public async void GetSpeechToken()
1819
response.EnsureSuccessStatusCode();
1920

2021
var contentStream = await response.Content.ReadAsStreamAsync();
21-
var speechTokenResponse = await JsonSerializer.DeserializeAsync<SpeechTokenResponse>(contentStream, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
22+
var speechTokenResponse = await JsonSerializer.DeserializeAsync<SpeechTokenResponse>(contentStream, jsonOpts);
2223

2324
Assert.NotNull(speechTokenResponse);
2425
Assert.True((speechTokenResponse.IsSuccess == true && !string.IsNullOrEmpty(speechTokenResponse.Token)) ||

integration-tests/StaticFiles.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Net.Http;
43
using Xunit;
54

65
namespace ChatCopilotIntegrationTests;

0 commit comments

Comments
 (0)