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
@@ -16,10 +16,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");
@@ -60,7 +60,7 @@ async Task SKAgent()
await assistantsClient.DeleteAssistantAsync(agent.Id);
}
async Task AFAgent()
async Task AFAgentAsync()
{
Console.WriteLine("\n=== AF Agent ===\n");
@@ -70,9 +70,7 @@ async Task AFAgent()
{
var assistantClient = sp.GetRequiredService<AssistantClient>();
var agent = assistantClient.CreateAIAgent(modelId, name: "Joker", instructions: "You are good at telling jokes.");
return agent;
return assistantClient.CreateAIAgent(modelId, name: "Joker", instructions: "You are good at telling jokes.");
});
await using ServiceProvider serviceProvider = serviceCollection.BuildServiceProvider();