Enable more analyzers and various code tweaks/cleanup (#738)

This commit is contained in:
Stephen Toub
2025-09-18 01:48:25 +00:00
committed by GitHub
parent f3264966ff
commit 5e5761b288
326 changed files with 2402 additions and 3642 deletions
@@ -12,10 +12,10 @@ var userInput = "Tell me a joke about a pirate.";
Console.WriteLine($"User Input: {userInput}");
await SKAgent();
await AFAgent();
await SKAgentAsync();
await AFAgentAsync();
async Task SKAgent()
async Task SKAgentAsync()
{
Console.WriteLine("\n=== SK Agent ===\n");
@@ -44,7 +44,7 @@ async Task SKAgent()
}
}
async Task AFAgent()
async Task AFAgentAsync()
{
Console.WriteLine("\n=== AF Agent ===\n");
@@ -17,10 +17,10 @@ Console.WriteLine($"User Input: {userInput}");
static string GetWeather([Description("The location to get the weather for.")] string location)
=> $"The weather in {location} is cloudy with a high of 15°C.";
await SKAgent();
await AFAgent();
await SKAgentAsync();
await AFAgentAsync();
async Task SKAgent()
async Task SKAgentAsync()
{
var builder = Kernel.CreateBuilder().AddOpenAIChatClient(modelId, apiKey);
@@ -40,7 +40,7 @@ async Task SKAgent()
Console.WriteLine(result.Message);
}
async Task AFAgent()
async Task AFAgentAsync()
{
var agent = new OpenAIClient(apiKey).GetChatClient(modelId).CreateAIAgent(
instructions: "You are a helpful assistant",
@@ -13,10 +13,10 @@ var userInput = "Tell me a joke about a pirate.";
Console.WriteLine($"User Input: {userInput}");
await SKAgent();
await AFAgent();
await SKAgentAsync();
await AFAgentAsync();
async Task SKAgent()
async Task SKAgentAsync()
{
Console.WriteLine("\n=== SK Agent ===\n");
@@ -36,7 +36,7 @@ async Task SKAgent()
Console.WriteLine(result.Message);
}
async Task AFAgent()
async Task AFAgentAsync()
{
Console.WriteLine("\n=== AF Agent ===\n");