A programming framework for agentic AI
[.Net] update dotnet-ci and dotnet-release to use 8.0.x version when setting up .NET. And enable format check (#3136)
Xiaoyun Zhang970c1961ddf7
diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.ymlindex f4074b061..7e5002591 100644--- a/.github/workflows/dotnet-build.yml+++ b/.github/workflows/dotnet-build.yml@@ -56,11 +56,16 @@ jobs:- name: Setup .NETuses: actions/setup-dotnet@v4with:- global-json-file: dotnet/global.json+ dotnet-version: '8.0.x'- name: Restore dependenciesrun: |# dotnet nuget add source --name dotnet-tool https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json --configfile NuGet.configdotnet restore -bl+ - name: Format check+ run: |+ echo "Format check"+ echo "If you see any error in this step, please run 'dotnet format' locally to format the code."+ dotnet format --verify-no-changes -v diag --no-restore- name: Buildrun: |echo "Build AutoGen"diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.ymlindex 2877d0583..aacfd115b 100644--- a/.github/workflows/dotnet-release.yml+++ b/.github/workflows/dotnet-release.yml@@ -32,7 +32,7 @@ jobs:- name: Setup .NETuses: actions/setup-dotnet@v4with:- global-json-file: dotnet/global.json+ dotnet-version: '8.0.x'- name: Restore dependenciesrun: |dotnet restore -bldiff --git a/dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent.cs b/dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent.csindex 031e50685..6f32c3cb4 100644--- a/dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent.cs+++ b/dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// AnthropicSamples.cs+// Create_Anthropic_Agent.csusing AutoGen.Anthropic.Extensions;using AutoGen.Anthropic.Utils;diff --git a/dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent_With_Tool.cs b/dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent_With_Tool.csindex 26bd32dd1..0324a39ff 100644--- a/dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent_With_Tool.cs+++ b/dotnet/sample/AutoGen.Anthropic.Samples/Create_Anthropic_Agent_With_Tool.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// Single_Anthropic_Tool.cs+// Create_Anthropic_Agent_With_Tool.csusing AutoGen.Anthropic.DTO;using AutoGen.Anthropic.Extensions;diff --git a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs b/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.csindex 795606ebc..1b5a9a903 100644--- a/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs+++ b/dotnet/sample/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs@@ -20,8 +20,7 @@ public class MiddlewareAgentCodeSnippetvar middlewareAgent = new MiddlewareAgent(innerAgent: agent);middlewareAgent.Use(async (messages, options, agent, ct) =>{- var lastMessage = messages.Last() as TextMessage;- if (lastMessage != null && lastMessage.Content.Contains("Hello World"))+ if (messages.Last() is TextMessage lastMessage && lastMessage.Content.Contains("Hello World")){lastMessage.Content = $"[middleware 0] {lastMessage.Content}";return lastMessage;@@ -39,8 +38,7 @@ public class MiddlewareAgentCodeSnippet#region register_middleware_agentmiddlewareAgent = agent.RegisterMiddleware(async (messages, options, agent, ct) =>{- var lastMessage = messages.Last() as TextMessage;- if (lastMessage != null && lastMessage.Content.Contains("Hello World"))+ if (messages.Last() is TextMessage lastMessage && lastMessage.Content.Contains("Hello World")){lastMessage.Content = $"[middleware 0] {lastMessage.Content}";return lastMessage;diff --git a/dotnet/sample/AutoGen.BasicSamples/Example04_Dynamic_GroupChat_Coding_Task.cs b/dotnet/sample/AutoGen.BasicSamples/Example04_Dynamic_GroupChat_Coding_Task.csindex 47dd8ce66..216059928 100644--- a/dotnet/sample/AutoGen.BasicSamples/Example04_Dynamic_GroupChat_Coding_Task.cs+++ b/dotnet/sample/AutoGen.BasicSamples/Example04_Dynamic_GroupChat_Coding_Task.cs@@ -17,14 +17,18 @@ public partial class Example04_Dynamic_GroupChat_Coding_Task// setup dotnet interactivevar workDir = Path.Combine(Path.GetTempPath(), "InteractiveService");if (!Directory.Exists(workDir))+ {Directory.CreateDirectory(workDir);+ }using var service = new InteractiveService(workDir);var dotnetInteractiveFunctions = new DotnetInteractiveFunction(service);var result = Path.Combine(workDir, "result.txt");if (File.Exists(result))+ {File.Delete(result);+ }await service.StartAsync(workDir, default);diff --git a/dotnet/sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs b/dotnet/sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.csindex 72719c606..004e0f055 100644--- a/dotnet/sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs+++ b/dotnet/sample/AutoGen.BasicSamples/Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs@@ -225,7 +225,9 @@ public partial class Example07_Dynamic_GroupChat_Calculate_Fibonaccilong the39thFibonacciNumber = 63245986;var workDir = Path.Combine(Path.GetTempPath(), "InteractiveService");if (!Directory.Exists(workDir))+ {Directory.CreateDirectory(workDir);+ }using var service = new InteractiveService(workDir);var dotnetInteractiveFunctions = new DotnetInteractiveFunction(service);@@ -329,7 +331,9 @@ public partial class Example07_Dynamic_GroupChat_Calculate_Fibonaccilong the39thFibonacciNumber = 63245986;var workDir = Path.Combine(Path.GetTempPath(), "InteractiveService");if (!Directory.Exists(workDir))+ {Directory.CreateDirectory(workDir);+ }using var service = new InteractiveService(workDir);var dotnetInteractiveFunctions = new DotnetInteractiveFunction(service);diff --git a/dotnet/sample/AutoGen.BasicSamples/Example13_OpenAIAgent_JsonMode.cs b/dotnet/sample/AutoGen.BasicSamples/Example13_OpenAIAgent_JsonMode.csindex 9e5b91ecc..596ab08d0 100644--- a/dotnet/sample/AutoGen.BasicSamples/Example13_OpenAIAgent_JsonMode.cs+++ b/dotnet/sample/AutoGen.BasicSamples/Example13_OpenAIAgent_JsonMode.cs@@ -1,3 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.// Example13_OpenAIAgent_JsonMode.cs-// this example has been moved to https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs\ No newline at end of file++// this example has been moved to https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs+diff --git a/dotnet/sample/AutoGen.BasicSamples/Example15_GPT4V_BinaryDataImageMessage.cs b/dotnet/sample/AutoGen.BasicSamples/Example15_GPT4V_BinaryDataImageMessage.csindex 788122d3f..dee991551 100644--- a/dotnet/sample/AutoGen.BasicSamples/Example15_GPT4V_BinaryDataImageMessage.cs+++ b/dotnet/sample/AutoGen.BasicSamples/Example15_GPT4V_BinaryDataImageMessage.cs@@ -50,7 +50,9 @@ public static class Example15_GPT4V_BinaryDataImageMessageforeach (string file in Directory.GetFiles(imageResourcePath)){if (!_mediaTypeMappings.TryGetValue(Path.GetExtension(file).ToLowerInvariant(), out var mediaType))+ {continue;+ }using var fs = new FileStream(file, FileMode.Open, FileAccess.Read);var ms = new MemoryStream();diff --git a/dotnet/sample/AutoGen.BasicSamples/Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs b/dotnet/sample/AutoGen.BasicSamples/Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.csindex f676e22a2..969f7dc21 100644--- a/dotnet/sample/AutoGen.BasicSamples/Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs+++ b/dotnet/sample/AutoGen.BasicSamples/Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs@@ -1,3 +1,4 @@// Copyright (c) Microsoft Corporation. All rights reserved.// Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs-// this example has been moved to https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs\ No newline at end of file++// this example has been moved to https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.csdiff --git a/dotnet/sample/AutoGen.BasicSamples/GettingStart/Dynamic_Group_Chat.cs b/dotnet/sample/AutoGen.BasicSamples/GettingStart/Dynamic_Group_Chat.csindex 9d21bbde7..7acaae4b1 100644--- a/dotnet/sample/AutoGen.BasicSamples/GettingStart/Dynamic_Group_Chat.cs+++ b/dotnet/sample/AutoGen.BasicSamples/GettingStart/Dynamic_Group_Chat.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// Dynamic_GroupChat.cs+// Dynamic_Group_Chat.csusing AutoGen.Core;using AutoGen.OpenAI;diff --git a/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs b/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.csindex b4206b4b6..3823de2a5 100644--- a/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs+++ b/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs@@ -1,5 +1,6 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs+// Connect_To_Ollama.cs+#region using_statementusing AutoGen.Core;using AutoGen.OpenAI.Extension;diff --git a/dotnet/sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs b/dotnet/sample/AutoGen.OpenAI.Sample/Use_Json_Mode.csindex 3bf88be72..d92983c50 100644--- a/dotnet/sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs+++ b/dotnet/sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// Example13_OpenAIAgent_JsonMode.cs+// Use_Json_Mode.csusing System.Text.Json;using System.Text.Json.Serialization;diff --git a/dotnet/src/AutoGen.Anthropic/Agent/AnthropicClientAgent.cs b/dotnet/src/AutoGen.Anthropic/Agent/AnthropicClientAgent.csindex a3ecc1cce..73510baeb 100644--- a/dotnet/src/AutoGen.Anthropic/Agent/AnthropicClientAgent.cs+++ b/dotnet/src/AutoGen.Anthropic/Agent/AnthropicClientAgent.cs@@ -1,4 +1,7 @@-using System;+// Copyright (c) Microsoft Corporation. All rights reserved.+// AnthropicClientAgent.cs++using System;using System.Collections.Generic;using System.Linq;using System.Runtime.CompilerServices;diff --git a/dotnet/src/AutoGen.Anthropic/AnthropicClient.cs b/dotnet/src/AutoGen.Anthropic/AnthropicClient.csindex dd35638c4..c58b2c195 100644--- a/dotnet/src/AutoGen.Anthropic/AnthropicClient.cs+++ b/dotnet/src/AutoGen.Anthropic/AnthropicClient.cs@@ -48,7 +48,9 @@ public sealed class AnthropicClient : IDisposablevar responseStream = await httpResponseMessage.Content.ReadAsStreamAsync();if (httpResponseMessage.IsSuccessStatusCode)+ {return await DeserializeResponseAsync<ChatCompletionResponse>(responseStream, cancellationToken);+ }ErrorResponse res = await DeserializeResponseAsync<ErrorResponse>(responseStream, cancellationToken);throw new Exception(res.Error?.Message);diff --git a/dotnet/src/AutoGen.Anthropic/Converters/ContentBaseConverter.cs b/dotnet/src/AutoGen.Anthropic/Converters/ContentBaseConverter.csindex b41a761dc..3e620f934 100644--- a/dotnet/src/AutoGen.Anthropic/Converters/ContentBaseConverter.cs+++ b/dotnet/src/AutoGen.Anthropic/Converters/ContentBaseConverter.cs@@ -1,12 +1,10 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// ContentConverter.cs--using AutoGen.Anthropic.DTO;-+// ContentBaseConverter.csusing System;using System.Text.Json;using System.Text.Json.Serialization;+using AutoGen.Anthropic.DTO;namespace AutoGen.Anthropic.Converters;public sealed class ContentBaseConverter : JsonConverter<ContentBase>diff --git a/dotnet/src/AutoGen.Anthropic/DTO/ChatCompletionRequest.cs b/dotnet/src/AutoGen.Anthropic/DTO/ChatCompletionRequest.csindex b18461e69..463ee7fc2 100644--- a/dotnet/src/AutoGen.Anthropic/DTO/ChatCompletionRequest.cs+++ b/dotnet/src/AutoGen.Anthropic/DTO/ChatCompletionRequest.cs@@ -1,7 +1,7 @@// Copyright (c) Microsoft Corporation. All rights reserved.// ChatCompletionRequest.cs-using System.Text.Json.Serialization;using System.Collections.Generic;+using System.Text.Json.Serialization;namespace AutoGen.Anthropic.DTO;diff --git a/dotnet/src/AutoGen.Anthropic/DTO/ChatCompletionResponse.cs b/dotnet/src/AutoGen.Anthropic/DTO/ChatCompletionResponse.csindex 2c6fa100f..fc33aa0e2 100644--- a/dotnet/src/AutoGen.Anthropic/DTO/ChatCompletionResponse.cs+++ b/dotnet/src/AutoGen.Anthropic/DTO/ChatCompletionResponse.cs@@ -1,10 +1,11 @@-// Copyright (c) Microsoft Corporation. All rights reserved.+// Copyright (c) Microsoft Corporation. All rights reserved.+// ChatCompletionResponse.cs-namespace AutoGen.Anthropic.DTO;using System.Collections.Generic;using System.Text.Json.Serialization;+namespace AutoGen.Anthropic.DTO;public class ChatCompletionResponse{[JsonPropertyName("content")]diff --git a/dotnet/src/AutoGen.Anthropic/DTO/Content.cs b/dotnet/src/AutoGen.Anthropic/DTO/Content.csindex ee7a745a1..353cf6ae8 100644--- a/dotnet/src/AutoGen.Anthropic/DTO/Content.cs+++ b/dotnet/src/AutoGen.Anthropic/DTO/Content.cs@@ -1,4 +1,4 @@-// Copyright (c) Microsoft Corporation. All rights reserved.+// Copyright (c) Microsoft Corporation. All rights reserved.// Content.csusing System.Text.Json.Nodes;diff --git a/dotnet/src/AutoGen.Anthropic/DTO/ErrorResponse.cs b/dotnet/src/AutoGen.Anthropic/DTO/ErrorResponse.csindex d02a8f6d1..1a94334c8 100644--- a/dotnet/src/AutoGen.Anthropic/DTO/ErrorResponse.cs+++ b/dotnet/src/AutoGen.Anthropic/DTO/ErrorResponse.cs@@ -1,4 +1,4 @@-// Copyright (c) Microsoft Corporation. All rights reserved.+// Copyright (c) Microsoft Corporation. All rights reserved.// ErrorResponse.csusing System.Text.Json.Serialization;diff --git a/dotnet/src/AutoGen.Anthropic/DTO/Tool.cs b/dotnet/src/AutoGen.Anthropic/DTO/Tool.csindex 41c20dc2a..2a46bc42a 100644--- a/dotnet/src/AutoGen.Anthropic/DTO/Tool.cs+++ b/dotnet/src/AutoGen.Anthropic/DTO/Tool.cs@@ -1,4 +1,4 @@-// Copyright (c) Microsoft Corporation. All rights reserved.+// Copyright (c) Microsoft Corporation. All rights reserved.// Tool.csusing System.Collections.Generic;diff --git a/dotnet/src/AutoGen.Anthropic/Utils/AnthropicConstants.cs b/dotnet/src/AutoGen.Anthropic/Utils/AnthropicConstants.csindex e70572cbd..6fd70cb4e 100644--- a/dotnet/src/AutoGen.Anthropic/Utils/AnthropicConstants.cs+++ b/dotnet/src/AutoGen.Anthropic/Utils/AnthropicConstants.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// Constants.cs+// AnthropicConstants.csnamespace AutoGen.Anthropic.Utils;diff --git a/dotnet/src/AutoGen.Core/Message/ToolCallAggregateMessage.cs b/dotnet/src/AutoGen.Core/Message/ToolCallAggregateMessage.csindex 7781b785e..7d46d5613 100644--- a/dotnet/src/AutoGen.Core/Message/ToolCallAggregateMessage.cs+++ b/dotnet/src/AutoGen.Core/Message/ToolCallAggregateMessage.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// FunctionCallAggregateMessage.cs+// ToolCallAggregateMessage.csusing System.Collections.Generic;diff --git a/dotnet/src/AutoGen.Gemini/IGeminiClient.cs b/dotnet/src/AutoGen.Gemini/IGeminiClient.csindex 2e209e02b..d391a4508 100644--- a/dotnet/src/AutoGen.Gemini/IGeminiClient.cs+++ b/dotnet/src/AutoGen.Gemini/IGeminiClient.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// IVertexGeminiClient.cs+// IGeminiClient.csusing System.Collections.Generic;using System.Threading;diff --git a/dotnet/src/AutoGen.Gemini/VertexGeminiClient.cs b/dotnet/src/AutoGen.Gemini/VertexGeminiClient.csindex c54f2280d..12a11993c 100644--- a/dotnet/src/AutoGen.Gemini/VertexGeminiClient.cs+++ b/dotnet/src/AutoGen.Gemini/VertexGeminiClient.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// IGeminiClient.cs+// VertexGeminiClient.csusing System.Collections.Generic;using System.Threading;diff --git a/dotnet/src/AutoGen.Ollama/DTOs/Message.cs b/dotnet/src/AutoGen.Ollama/DTOs/Message.csindex 2e0d891cc..75f622ff7 100644--- a/dotnet/src/AutoGen.Ollama/DTOs/Message.cs+++ b/dotnet/src/AutoGen.Ollama/DTOs/Message.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// ChatResponseUpdate.cs+// Message.csusing System.Collections.Generic;using System.Text.Json.Serialization;diff --git a/dotnet/src/AutoGen.Ollama/Embeddings/ITextEmbeddingService.cs b/dotnet/src/AutoGen.Ollama/Embeddings/ITextEmbeddingService.csindex 5ce0dc8cc..cce6dbb83 100644--- a/dotnet/src/AutoGen.Ollama/Embeddings/ITextEmbeddingService.cs+++ b/dotnet/src/AutoGen.Ollama/Embeddings/ITextEmbeddingService.cs@@ -1,4 +1,4 @@-// Copyright (c) Microsoft Corporation. All rights reserved.+// Copyright (c) Microsoft Corporation. All rights reserved.// ITextEmbeddingService.csusing System.Threading;diff --git a/dotnet/src/AutoGen.Ollama/Embeddings/OllamaTextEmbeddingService.cs b/dotnet/src/AutoGen.Ollama/Embeddings/OllamaTextEmbeddingService.csindex 2e431e7bc..ea4993eb8 100644--- a/dotnet/src/AutoGen.Ollama/Embeddings/OllamaTextEmbeddingService.cs+++ b/dotnet/src/AutoGen.Ollama/Embeddings/OllamaTextEmbeddingService.cs@@ -1,4 +1,4 @@-// Copyright (c) Microsoft Corporation. All rights reserved.+// Copyright (c) Microsoft Corporation. All rights reserved.// OllamaTextEmbeddingService.csusing System;diff --git a/dotnet/src/AutoGen.Ollama/Embeddings/TextEmbeddingsRequest.cs b/dotnet/src/AutoGen.Ollama/Embeddings/TextEmbeddingsRequest.csindex 7f2531c52..d776b183d 100644--- a/dotnet/src/AutoGen.Ollama/Embeddings/TextEmbeddingsRequest.cs+++ b/dotnet/src/AutoGen.Ollama/Embeddings/TextEmbeddingsRequest.cs@@ -1,4 +1,4 @@-// Copyright (c) Microsoft Corporation. All rights reserved.+// Copyright (c) Microsoft Corporation. All rights reserved.// TextEmbeddingsRequest.csusing System.Text.Json.Serialization;diff --git a/dotnet/src/AutoGen.Ollama/Embeddings/TextEmbeddingsResponse.cs b/dotnet/src/AutoGen.Ollama/Embeddings/TextEmbeddingsResponse.csindex 580059c03..f3ce64b70 100644--- a/dotnet/src/AutoGen.Ollama/Embeddings/TextEmbeddingsResponse.cs+++ b/dotnet/src/AutoGen.Ollama/Embeddings/TextEmbeddingsResponse.cs@@ -1,4 +1,4 @@-// Copyright (c) Microsoft Corporation. All rights reserved.+// Copyright (c) Microsoft Corporation. All rights reserved.// TextEmbeddingsResponse.csusing System.Text.Json.Serialization;diff --git a/dotnet/src/AutoGen.SourceGenerator/SourceGeneratorFunctionContract.cs b/dotnet/src/AutoGen.SourceGenerator/SourceGeneratorFunctionContract.csindex 24e42affa..aa4980379 100644--- a/dotnet/src/AutoGen.SourceGenerator/SourceGeneratorFunctionContract.cs+++ b/dotnet/src/AutoGen.SourceGenerator/SourceGeneratorFunctionContract.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// FunctionContract.cs+// SourceGeneratorFunctionContract.csnamespace AutoGen.SourceGenerator{diff --git a/dotnet/src/AutoGen.WebAPI/OpenAI/DTO/OpenAIMessage.cs b/dotnet/src/AutoGen.WebAPI/OpenAI/DTO/OpenAIMessage.csindex 3cad9ae36..24cbb72fb 100644--- a/dotnet/src/AutoGen.WebAPI/OpenAI/DTO/OpenAIMessage.cs+++ b/dotnet/src/AutoGen.WebAPI/OpenAI/DTO/OpenAIMessage.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// OpenAIChatCompletionOption.cs+// OpenAIMessage.csusing System.Text.Json.Serialization;diff --git a/dotnet/src/AutoGen.WebAPI/OpenAI/DTO/OpenAIStreamOptions.cs b/dotnet/src/AutoGen.WebAPI/OpenAI/DTO/OpenAIStreamOptions.csindex 3c188b865..7a4985144 100644--- a/dotnet/src/AutoGen.WebAPI/OpenAI/DTO/OpenAIStreamOptions.cs+++ b/dotnet/src/AutoGen.WebAPI/OpenAI/DTO/OpenAIStreamOptions.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-//+// OpenAIStreamOptions.csusing System.Text.Json.Serialization;diff --git a/dotnet/test/AutoGen.Anthropic.Tests/AnthropicClientAgentTest.cs b/dotnet/test/AutoGen.Anthropic.Tests/AnthropicClientAgentTest.csindex 552408f1d..085917d41 100644--- a/dotnet/test/AutoGen.Anthropic.Tests/AnthropicClientAgentTest.cs+++ b/dotnet/test/AutoGen.Anthropic.Tests/AnthropicClientAgentTest.cs@@ -188,7 +188,7 @@ public class AnthropicClientAgentTestIMessage[] chatHistory = [new TextMessage(Role.User, "what's the weather in Philadelphia?"),new ToolCallMessage([toolCall], from: "assistant"),- new ToolCallResultMessage([toolCall], from: "user" ),+ new ToolCallResultMessage([toolCall], from: "user"),];var reply = await agent.SendAsync(chatHistory: chatHistory);diff --git a/dotnet/test/AutoGen.Anthropic.Tests/AnthropicClientTest.cs b/dotnet/test/AutoGen.Anthropic.Tests/AnthropicClientTest.csindex 66b7d0077..102e48b9b 100644--- a/dotnet/test/AutoGen.Anthropic.Tests/AnthropicClientTest.cs+++ b/dotnet/test/AutoGen.Anthropic.Tests/AnthropicClientTest.cs@@ -1,4 +1,7 @@-using System.Text;+// Copyright (c) Microsoft Corporation. All rights reserved.+// AnthropicClientTest.cs++using System.Text;using System.Text.Json;using System.Text.Json.Nodes;using System.Text.Json.Serialization;@@ -59,7 +62,9 @@ public class AnthropicClientTestsforeach (ChatCompletionResponse result in results){if (result.Delta is not null && !string.IsNullOrEmpty(result.Delta.Text))+ {sb.Append(result.Delta.Text);+ }}string resultContent = sb.ToString();diff --git a/dotnet/test/AutoGen.Anthropic.Tests/AnthropicTestFunctionCalls.cs b/dotnet/test/AutoGen.Anthropic.Tests/AnthropicTestFunctionCalls.csindex 5f1c0971b..8b5466e3a 100644--- a/dotnet/test/AutoGen.Anthropic.Tests/AnthropicTestFunctionCalls.cs+++ b/dotnet/test/AutoGen.Anthropic.Tests/AnthropicTestFunctionCalls.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// AnthropicTestFunctions.cs+// AnthropicTestFunctionCalls.csusing System.Text.Json;using System.Text.Json.Serialization;diff --git a/dotnet/test/AutoGen.Gemini.Tests/GeminiAgentTests.cs b/dotnet/test/AutoGen.Gemini.Tests/GeminiAgentTests.csindex 6d095845f..c076aee18 100644--- a/dotnet/test/AutoGen.Gemini.Tests/GeminiAgentTests.cs+++ b/dotnet/test/AutoGen.Gemini.Tests/GeminiAgentTests.cs@@ -1,13 +1,13 @@// Copyright (c) Microsoft Corporation. All rights reserved.// GeminiAgentTests.cs-using AutoGen.Tests;-using Google.Cloud.AIPlatform.V1;using AutoGen.Core;-using FluentAssertions;using AutoGen.Gemini.Extension;-using static Google.Cloud.AIPlatform.V1.Part;+using AutoGen.Tests;+using FluentAssertions;+using Google.Cloud.AIPlatform.V1;using Xunit.Abstractions;+using static Google.Cloud.AIPlatform.V1.Part;namespace AutoGen.Gemini.Tests;public class GeminiAgentTestsdiff --git a/dotnet/test/AutoGen.Gemini.Tests/VertexGeminiClientTests.cs b/dotnet/test/AutoGen.Gemini.Tests/VertexGeminiClientTests.csindex 8063b7077..fba97aa52 100644--- a/dotnet/test/AutoGen.Gemini.Tests/VertexGeminiClientTests.cs+++ b/dotnet/test/AutoGen.Gemini.Tests/VertexGeminiClientTests.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// GeminiVertexClientTests.cs+// VertexGeminiClientTests.csusing AutoGen.Tests;using FluentAssertions;diff --git a/dotnet/test/AutoGen.Ollama.Tests/OllamaTextEmbeddingServiceTests.cs b/dotnet/test/AutoGen.Ollama.Tests/OllamaTextEmbeddingServiceTests.csindex 06522bdd8..b7186a3c6 100644--- a/dotnet/test/AutoGen.Ollama.Tests/OllamaTextEmbeddingServiceTests.cs+++ b/dotnet/test/AutoGen.Ollama.Tests/OllamaTextEmbeddingServiceTests.cs@@ -1,4 +1,4 @@-// Copyright (c) Microsoft Corporation. All rights reserved.+// Copyright (c) Microsoft Corporation. All rights reserved.// OllamaTextEmbeddingServiceTests.csusing AutoGen.Tests;diff --git a/dotnet/test/AutoGen.SourceGenerator.Tests/FunctionCallTemplateEncodingTests.cs b/dotnet/test/AutoGen.SourceGenerator.Tests/FunctionCallTemplateEncodingTests.csindex 8ca6e31a8..0b2e211c6 100644--- a/dotnet/test/AutoGen.SourceGenerator.Tests/FunctionCallTemplateEncodingTests.cs+++ b/dotnet/test/AutoGen.SourceGenerator.Tests/FunctionCallTemplateEncodingTests.cs@@ -1,7 +1,9 @@-// Using directives+// Copyright (c) Microsoft Corporation. All rights reserved.+// FunctionCallTemplateEncodingTests.cs+using System.Text.Json; // Needed for JsonSerializer-using Xunit; // Needed for Fact and Assertusing AutoGen.SourceGenerator.Template; // Needed for FunctionCallTemplate+using Xunit; // Needed for Fact and Assertnamespace AutoGen.SourceGenerator.Tests{@@ -89,4 +91,4 @@ namespace AutoGen.SourceGenerator.TestsAssert.Contains("Description = @\"This is a \"\"parameter\"\" description\"", result);}}-}\ No newline at end of file+}diff --git a/dotnet/test/AutoGen.Tests/GroupChat/GraphTests.cs b/dotnet/test/AutoGen.Tests/GroupChat/GraphTests.csindex 77e2c99dc..7eeea6743 100644--- a/dotnet/test/AutoGen.Tests/GroupChat/GraphTests.cs+++ b/dotnet/test/AutoGen.Tests/GroupChat/GraphTests.cs@@ -1,4 +1,6 @@-+// Copyright (c) Microsoft Corporation. All rights reserved.+// GraphTests.cs+using Xunit;namespace AutoGen.Testsdiff --git a/dotnet/test/AutoGen.WebAPI.Tests/EchoAgent.cs b/dotnet/test/AutoGen.WebAPI.Tests/EchoAgent.csindex 64d48d2a0..6f9d217b5 100644--- a/dotnet/test/AutoGen.WebAPI.Tests/EchoAgent.cs+++ b/dotnet/test/AutoGen.WebAPI.Tests/EchoAgent.cs@@ -1,5 +1,5 @@// Copyright (c) Microsoft Corporation. All rights reserved.-// OpenAIChatCompletionMiddlewareTests.cs+// EchoAgent.csusing System.Runtime.CompilerServices;using AutoGen.Core;