[.Net] update dotnet-ci and dotnet-release to use 8.0.x version when setting up .NET. And enable format check (#3136)

* use 8.0.x versin

* enable format check

* change file header

* apply code format

* add instructions in ci to fix format error

* add comment back
This commit is contained in:
Xiaoyun Zhang
2024-07-15 12:33:10 -07:00
committed by GitHub
parent 7205ccc3b9
commit 970c1961dd
42 changed files with 80 additions and 50 deletions

View File

@@ -188,7 +188,7 @@ public class AnthropicClientAgentTest
IMessage[] 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);

View File

@@ -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 AnthropicClientTests
foreach (ChatCompletionResponse result in results)
{
if (result.Delta is not null && !string.IsNullOrEmpty(result.Delta.Text))
{
sb.Append(result.Delta.Text);
}
}
string resultContent = sb.ToString();

View File

@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// AnthropicTestFunctions.cs
// AnthropicTestFunctionCalls.cs
using System.Text.Json;
using System.Text.Json.Serialization;

View File

@@ -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 GeminiAgentTests

View File

@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// GeminiVertexClientTests.cs
// VertexGeminiClientTests.cs
using AutoGen.Tests;
using FluentAssertions;

View File

@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// OllamaTextEmbeddingServiceTests.cs
using AutoGen.Tests;

View File

@@ -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 Assert
using AutoGen.SourceGenerator.Template; // Needed for FunctionCallTemplate
using Xunit; // Needed for Fact and Assert
namespace AutoGen.SourceGenerator.Tests
{
@@ -89,4 +91,4 @@ namespace AutoGen.SourceGenerator.Tests
Assert.Contains("Description = @\"This is a \"\"parameter\"\" description\"", result);
}
}
}
}

View File

@@ -1,4 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// GraphTests.cs
using Xunit;
namespace AutoGen.Tests

View File

@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// OpenAIChatCompletionMiddlewareTests.cs
// EchoAgent.cs
using System.Runtime.CompilerServices;
using AutoGen.Core;