Skip to content

Commit 4328456

Browse files
committed
Address format issues
1 parent 4f24c7a commit 4328456

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

dotnet/src/Connectors/Connectors.Google.UnitTests/Extensions/GoogleAIServiceCollectionExtensionsTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ public void GoogleGenAIChatClientShouldBeRegisteredWithServiceId()
213213
{
214214
// Arrange
215215
var services = new ServiceCollection();
216-
const string serviceId = "test-service-id";
216+
const string ServiceId = "test-service-id";
217217

218218
// Act
219-
services.AddGoogleGenAIChatClient("modelId", "apiKey", serviceId: serviceId);
219+
services.AddGoogleGenAIChatClient("modelId", "apiKey", serviceId: ServiceId);
220220
var serviceProvider = services.BuildServiceProvider();
221221

222222
// Assert
223-
var chatClient = serviceProvider.GetKeyedService<IChatClient>(serviceId);
223+
var chatClient = serviceProvider.GetKeyedService<IChatClient>(ServiceId);
224224
Assert.NotNull(chatClient);
225225
}
226226

@@ -229,10 +229,10 @@ public void GoogleVertexAIChatClientShouldBeRegisteredWithServiceId()
229229
{
230230
// Arrange
231231
var services = new ServiceCollection();
232-
const string serviceId = "test-service-id";
232+
const string ServiceId = "test-service-id";
233233

234234
// Act
235-
services.AddGoogleVertexAIChatClient("modelId", project: "test-project", location: "us-central1", serviceId: serviceId);
235+
services.AddGoogleVertexAIChatClient("modelId", project: "test-project", location: "us-central1", serviceId: ServiceId);
236236
var serviceProvider = services.BuildServiceProvider();
237237

238238
// Assert - just verify no exception during registration

dotnet/src/Connectors/Connectors.Google/Services/GoogleGenAIChatClient.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@
1313
using Google.GenAI;
1414
using Google.GenAI.Types;
1515
using Microsoft.Extensions.AI;
16-
17-
// Type aliases to distinguish between Semantic Kernel and M.E.AI types
18-
using AITextContent = Microsoft.Extensions.AI.TextContent;
1916
using AIDataContent = Microsoft.Extensions.AI.DataContent;
20-
using AIUriContent = Microsoft.Extensions.AI.UriContent;
2117
using AIFunctionCallContent = Microsoft.Extensions.AI.FunctionCallContent;
2218
using AIFunctionResultContent = Microsoft.Extensions.AI.FunctionResultContent;
19+
// Type aliases to distinguish between Semantic Kernel and M.E.AI types
20+
using AITextContent = Microsoft.Extensions.AI.TextContent;
21+
using AIUriContent = Microsoft.Extensions.AI.UriContent;
2322

2423
namespace Microsoft.SemanticKernel.Connectors.Google;
2524

@@ -112,7 +111,7 @@ public async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(IEnu
112111
(string? modelId, List<Content> contents, GenerateContentConfig config) = this.CreateRequest(messages, options);
113112

114113
// Send it, and process the results.
115-
await foreach (GenerateContentResponse generateResult in this._models.GenerateContentStreamAsync(modelId!, contents, config).WithCancellation(cancellationToken).ConfigureAwait(false))
114+
await foreach (GenerateContentResponse generateResult in this._models.GenerateContentStreamAsync(modelId!, contents, config).WithCancellation(cancellationToken).ConfigureAwait(false).ConfigureAwait(false))
116115
{
117116
// Create a response update for each result in the stream.
118117
ChatResponseUpdate responseUpdate = new(ChatRole.Assistant, new List<AIContent>())

dotnet/src/IntegrationTests/Connectors/Google/Gemini/GeminiVertexAIChatClientTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
22

33
using System;
44
using System.Linq;

dotnet/src/IntegrationTests/Connectors/Google/Gemini/GeminiVertexAIFunctionCallingChatClientTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
22

33
using System;
44
using System.ComponentModel;

0 commit comments

Comments
 (0)