* use 8.0.x versin * enable format check * change file header * apply code format * add instructions in ci to fix format error * add comment backtags/v0.2.33
| @@ -56,11 +56,16 @@ jobs: | |||||
| - name: Setup .NET | - name: Setup .NET | ||||
| uses: actions/setup-dotnet@v4 | uses: actions/setup-dotnet@v4 | ||||
| with: | with: | ||||
| global-json-file: dotnet/global.json | |||||
| dotnet-version: '8.0.x' | |||||
| - name: Restore dependencies | - name: Restore dependencies | ||||
| run: | | run: | | ||||
| # dotnet nuget add source --name dotnet-tool https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json --configfile NuGet.config | # dotnet nuget add source --name dotnet-tool https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json --configfile NuGet.config | ||||
| dotnet restore -bl | dotnet 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: Build | - name: Build | ||||
| run: | | run: | | ||||
| echo "Build AutoGen" | echo "Build AutoGen" | ||||
| @@ -32,7 +32,7 @@ jobs: | |||||
| - name: Setup .NET | - name: Setup .NET | ||||
| uses: actions/setup-dotnet@v4 | uses: actions/setup-dotnet@v4 | ||||
| with: | with: | ||||
| global-json-file: dotnet/global.json | |||||
| dotnet-version: '8.0.x' | |||||
| - name: Restore dependencies | - name: Restore dependencies | ||||
| run: | | run: | | ||||
| dotnet restore -bl | dotnet restore -bl | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // AnthropicSamples.cs | |||||
| // Create_Anthropic_Agent.cs | |||||
| using AutoGen.Anthropic.Extensions; | using AutoGen.Anthropic.Extensions; | ||||
| using AutoGen.Anthropic.Utils; | using AutoGen.Anthropic.Utils; | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // Single_Anthropic_Tool.cs | |||||
| // Create_Anthropic_Agent_With_Tool.cs | |||||
| using AutoGen.Anthropic.DTO; | using AutoGen.Anthropic.DTO; | ||||
| using AutoGen.Anthropic.Extensions; | using AutoGen.Anthropic.Extensions; | ||||
| @@ -20,8 +20,7 @@ public class MiddlewareAgentCodeSnippet | |||||
| var middlewareAgent = new MiddlewareAgent(innerAgent: agent); | var middlewareAgent = new MiddlewareAgent(innerAgent: agent); | ||||
| middlewareAgent.Use(async (messages, options, agent, ct) => | 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}"; | lastMessage.Content = $"[middleware 0] {lastMessage.Content}"; | ||||
| return lastMessage; | return lastMessage; | ||||
| @@ -39,8 +38,7 @@ public class MiddlewareAgentCodeSnippet | |||||
| #region register_middleware_agent | #region register_middleware_agent | ||||
| middlewareAgent = agent.RegisterMiddleware(async (messages, options, agent, ct) => | middlewareAgent = 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}"; | lastMessage.Content = $"[middleware 0] {lastMessage.Content}"; | ||||
| return lastMessage; | return lastMessage; | ||||
| @@ -17,14 +17,18 @@ public partial class Example04_Dynamic_GroupChat_Coding_Task | |||||
| // setup dotnet interactive | // setup dotnet interactive | ||||
| var workDir = Path.Combine(Path.GetTempPath(), "InteractiveService"); | var workDir = Path.Combine(Path.GetTempPath(), "InteractiveService"); | ||||
| if (!Directory.Exists(workDir)) | if (!Directory.Exists(workDir)) | ||||
| { | |||||
| Directory.CreateDirectory(workDir); | Directory.CreateDirectory(workDir); | ||||
| } | |||||
| using var service = new InteractiveService(workDir); | using var service = new InteractiveService(workDir); | ||||
| var dotnetInteractiveFunctions = new DotnetInteractiveFunction(service); | var dotnetInteractiveFunctions = new DotnetInteractiveFunction(service); | ||||
| var result = Path.Combine(workDir, "result.txt"); | var result = Path.Combine(workDir, "result.txt"); | ||||
| if (File.Exists(result)) | if (File.Exists(result)) | ||||
| { | |||||
| File.Delete(result); | File.Delete(result); | ||||
| } | |||||
| await service.StartAsync(workDir, default); | await service.StartAsync(workDir, default); | ||||
| @@ -225,7 +225,9 @@ public partial class Example07_Dynamic_GroupChat_Calculate_Fibonacci | |||||
| long the39thFibonacciNumber = 63245986; | long the39thFibonacciNumber = 63245986; | ||||
| var workDir = Path.Combine(Path.GetTempPath(), "InteractiveService"); | var workDir = Path.Combine(Path.GetTempPath(), "InteractiveService"); | ||||
| if (!Directory.Exists(workDir)) | if (!Directory.Exists(workDir)) | ||||
| { | |||||
| Directory.CreateDirectory(workDir); | Directory.CreateDirectory(workDir); | ||||
| } | |||||
| using var service = new InteractiveService(workDir); | using var service = new InteractiveService(workDir); | ||||
| var dotnetInteractiveFunctions = new DotnetInteractiveFunction(service); | var dotnetInteractiveFunctions = new DotnetInteractiveFunction(service); | ||||
| @@ -329,7 +331,9 @@ public partial class Example07_Dynamic_GroupChat_Calculate_Fibonacci | |||||
| long the39thFibonacciNumber = 63245986; | long the39thFibonacciNumber = 63245986; | ||||
| var workDir = Path.Combine(Path.GetTempPath(), "InteractiveService"); | var workDir = Path.Combine(Path.GetTempPath(), "InteractiveService"); | ||||
| if (!Directory.Exists(workDir)) | if (!Directory.Exists(workDir)) | ||||
| { | |||||
| Directory.CreateDirectory(workDir); | Directory.CreateDirectory(workDir); | ||||
| } | |||||
| using var service = new InteractiveService(workDir); | using var service = new InteractiveService(workDir); | ||||
| var dotnetInteractiveFunctions = new DotnetInteractiveFunction(service); | var dotnetInteractiveFunctions = new DotnetInteractiveFunction(service); | ||||
| @@ -1,3 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // Example13_OpenAIAgent_JsonMode.cs | // 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 | |||||
| // this example has been moved to https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Use_Json_Mode.cs | |||||
| @@ -50,7 +50,9 @@ public static class Example15_GPT4V_BinaryDataImageMessage | |||||
| foreach (string file in Directory.GetFiles(imageResourcePath)) | foreach (string file in Directory.GetFiles(imageResourcePath)) | ||||
| { | { | ||||
| if (!_mediaTypeMappings.TryGetValue(Path.GetExtension(file).ToLowerInvariant(), out var mediaType)) | if (!_mediaTypeMappings.TryGetValue(Path.GetExtension(file).ToLowerInvariant(), out var mediaType)) | ||||
| { | |||||
| continue; | continue; | ||||
| } | |||||
| using var fs = new FileStream(file, FileMode.Open, FileAccess.Read); | using var fs = new FileStream(file, FileMode.Open, FileAccess.Read); | ||||
| var ms = new MemoryStream(); | var ms = new MemoryStream(); | ||||
| @@ -1,3 +1,4 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs | // 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 | |||||
| // this example has been moved to https://github.com/microsoft/autogen/blob/main/dotnet/sample/AutoGen.OpenAI.Sample/Connect_To_Ollama.cs | |||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // Dynamic_GroupChat.cs | |||||
| // Dynamic_Group_Chat.cs | |||||
| using AutoGen.Core; | using AutoGen.Core; | ||||
| using AutoGen.OpenAI; | using AutoGen.OpenAI; | ||||
| @@ -1,5 +1,6 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs | |||||
| // Connect_To_Ollama.cs | |||||
| #region using_statement | #region using_statement | ||||
| using AutoGen.Core; | using AutoGen.Core; | ||||
| using AutoGen.OpenAI.Extension; | using AutoGen.OpenAI.Extension; | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // Example13_OpenAIAgent_JsonMode.cs | |||||
| // Use_Json_Mode.cs | |||||
| using System.Text.Json; | using System.Text.Json; | ||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||
| @@ -1,4 +1,7 @@ | |||||
| using System; | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // AnthropicClientAgent.cs | |||||
| using System; | |||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||
| using System.Linq; | using System.Linq; | ||||
| using System.Runtime.CompilerServices; | using System.Runtime.CompilerServices; | ||||
| @@ -48,7 +48,9 @@ public sealed class AnthropicClient : IDisposable | |||||
| var responseStream = await httpResponseMessage.Content.ReadAsStreamAsync(); | var responseStream = await httpResponseMessage.Content.ReadAsStreamAsync(); | ||||
| if (httpResponseMessage.IsSuccessStatusCode) | if (httpResponseMessage.IsSuccessStatusCode) | ||||
| { | |||||
| return await DeserializeResponseAsync<ChatCompletionResponse>(responseStream, cancellationToken); | return await DeserializeResponseAsync<ChatCompletionResponse>(responseStream, cancellationToken); | ||||
| } | |||||
| ErrorResponse res = await DeserializeResponseAsync<ErrorResponse>(responseStream, cancellationToken); | ErrorResponse res = await DeserializeResponseAsync<ErrorResponse>(responseStream, cancellationToken); | ||||
| throw new Exception(res.Error?.Message); | throw new Exception(res.Error?.Message); | ||||
| @@ -1,12 +1,10 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // ContentConverter.cs | |||||
| using AutoGen.Anthropic.DTO; | |||||
| // ContentBaseConverter.cs | |||||
| using System; | using System; | ||||
| using System.Text.Json; | using System.Text.Json; | ||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||
| using AutoGen.Anthropic.DTO; | |||||
| namespace AutoGen.Anthropic.Converters; | namespace AutoGen.Anthropic.Converters; | ||||
| public sealed class ContentBaseConverter : JsonConverter<ContentBase> | public sealed class ContentBaseConverter : JsonConverter<ContentBase> | ||||
| @@ -1,7 +1,7 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // ChatCompletionRequest.cs | // ChatCompletionRequest.cs | ||||
| using System.Text.Json.Serialization; | |||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||
| using System.Text.Json.Serialization; | |||||
| namespace AutoGen.Anthropic.DTO; | namespace AutoGen.Anthropic.DTO; | ||||
| @@ -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.Collections.Generic; | ||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||
| namespace AutoGen.Anthropic.DTO; | |||||
| public class ChatCompletionResponse | public class ChatCompletionResponse | ||||
| { | { | ||||
| [JsonPropertyName("content")] | [JsonPropertyName("content")] | ||||
| @@ -1,4 +1,4 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // Content.cs | // Content.cs | ||||
| using System.Text.Json.Nodes; | using System.Text.Json.Nodes; | ||||
| @@ -1,4 +1,4 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // ErrorResponse.cs | // ErrorResponse.cs | ||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||
| @@ -1,4 +1,4 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // Tool.cs | // Tool.cs | ||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // Constants.cs | |||||
| // AnthropicConstants.cs | |||||
| namespace AutoGen.Anthropic.Utils; | namespace AutoGen.Anthropic.Utils; | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // FunctionCallAggregateMessage.cs | |||||
| // ToolCallAggregateMessage.cs | |||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // IVertexGeminiClient.cs | |||||
| // IGeminiClient.cs | |||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||
| using System.Threading; | using System.Threading; | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // IGeminiClient.cs | |||||
| // VertexGeminiClient.cs | |||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||
| using System.Threading; | using System.Threading; | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // ChatResponseUpdate.cs | |||||
| // Message.cs | |||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||
| @@ -1,4 +1,4 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // ITextEmbeddingService.cs | // ITextEmbeddingService.cs | ||||
| using System.Threading; | using System.Threading; | ||||
| @@ -1,4 +1,4 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // OllamaTextEmbeddingService.cs | // OllamaTextEmbeddingService.cs | ||||
| using System; | using System; | ||||
| @@ -1,4 +1,4 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // TextEmbeddingsRequest.cs | // TextEmbeddingsRequest.cs | ||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||
| @@ -1,4 +1,4 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // TextEmbeddingsResponse.cs | // TextEmbeddingsResponse.cs | ||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // FunctionContract.cs | |||||
| // SourceGeneratorFunctionContract.cs | |||||
| namespace AutoGen.SourceGenerator | namespace AutoGen.SourceGenerator | ||||
| { | { | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // OpenAIChatCompletionOption.cs | |||||
| // OpenAIMessage.cs | |||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // | |||||
| // OpenAIStreamOptions.cs | |||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||
| @@ -188,7 +188,7 @@ public class AnthropicClientAgentTest | |||||
| IMessage[] chatHistory = [ | IMessage[] chatHistory = [ | ||||
| new TextMessage(Role.User, "what's the weather in Philadelphia?"), | new TextMessage(Role.User, "what's the weather in Philadelphia?"), | ||||
| new ToolCallMessage([toolCall], from: "assistant"), | new ToolCallMessage([toolCall], from: "assistant"), | ||||
| new ToolCallResultMessage([toolCall], from: "user" ), | |||||
| new ToolCallResultMessage([toolCall], from: "user"), | |||||
| ]; | ]; | ||||
| var reply = await agent.SendAsync(chatHistory: chatHistory); | var reply = await agent.SendAsync(chatHistory: chatHistory); | ||||
| @@ -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; | ||||
| using System.Text.Json.Nodes; | using System.Text.Json.Nodes; | ||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||
| @@ -59,7 +62,9 @@ public class AnthropicClientTests | |||||
| foreach (ChatCompletionResponse result in results) | foreach (ChatCompletionResponse result in results) | ||||
| { | { | ||||
| if (result.Delta is not null && !string.IsNullOrEmpty(result.Delta.Text)) | if (result.Delta is not null && !string.IsNullOrEmpty(result.Delta.Text)) | ||||
| { | |||||
| sb.Append(result.Delta.Text); | sb.Append(result.Delta.Text); | ||||
| } | |||||
| } | } | ||||
| string resultContent = sb.ToString(); | string resultContent = sb.ToString(); | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // AnthropicTestFunctions.cs | |||||
| // AnthropicTestFunctionCalls.cs | |||||
| using System.Text.Json; | using System.Text.Json; | ||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||
| @@ -1,13 +1,13 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // GeminiAgentTests.cs | // GeminiAgentTests.cs | ||||
| using AutoGen.Tests; | |||||
| using Google.Cloud.AIPlatform.V1; | |||||
| using AutoGen.Core; | using AutoGen.Core; | ||||
| using FluentAssertions; | |||||
| using AutoGen.Gemini.Extension; | 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 Xunit.Abstractions; | ||||
| using static Google.Cloud.AIPlatform.V1.Part; | |||||
| namespace AutoGen.Gemini.Tests; | namespace AutoGen.Gemini.Tests; | ||||
| public class GeminiAgentTests | public class GeminiAgentTests | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // GeminiVertexClientTests.cs | |||||
| // VertexGeminiClientTests.cs | |||||
| using AutoGen.Tests; | using AutoGen.Tests; | ||||
| using FluentAssertions; | using FluentAssertions; | ||||
| @@ -1,4 +1,4 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // OllamaTextEmbeddingServiceTests.cs | // OllamaTextEmbeddingServiceTests.cs | ||||
| using AutoGen.Tests; | using AutoGen.Tests; | ||||
| @@ -1,7 +1,9 @@ | |||||
| // Using directives | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // FunctionCallTemplateEncodingTests.cs | |||||
| using System.Text.Json; // Needed for JsonSerializer | using System.Text.Json; // Needed for JsonSerializer | ||||
| using Xunit; // Needed for Fact and Assert | |||||
| using AutoGen.SourceGenerator.Template; // Needed for FunctionCallTemplate | using AutoGen.SourceGenerator.Template; // Needed for FunctionCallTemplate | ||||
| using Xunit; // Needed for Fact and Assert | |||||
| namespace AutoGen.SourceGenerator.Tests | namespace AutoGen.SourceGenerator.Tests | ||||
| { | { | ||||
| @@ -89,4 +91,4 @@ namespace AutoGen.SourceGenerator.Tests | |||||
| Assert.Contains("Description = @\"This is a \"\"parameter\"\" description\"", result); | Assert.Contains("Description = @\"This is a \"\"parameter\"\" description\"", result); | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -1,4 +1,6 @@ | |||||
| | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | |||||
| // GraphTests.cs | |||||
| using Xunit; | using Xunit; | ||||
| namespace AutoGen.Tests | namespace AutoGen.Tests | ||||
| @@ -1,5 +1,5 @@ | |||||
| // Copyright (c) Microsoft Corporation. All rights reserved. | // Copyright (c) Microsoft Corporation. All rights reserved. | ||||
| // OpenAIChatCompletionMiddlewareTests.cs | |||||
| // EchoAgent.cs | |||||
| using System.Runtime.CompilerServices; | using System.Runtime.CompilerServices; | ||||
| using AutoGen.Core; | using AutoGen.Core; | ||||