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");
@@ -61,7 +61,7 @@ async Task SKAgent()
await agent.Client.Administration.DeleteAgentAsync(agent.Id);
}
async Task AFAgent()
async Task AFAgentAsync()
{
Console.WriteLine("\n=== AF Agent ===\n");
@@ -71,12 +71,10 @@ async Task AFAgent()
{
var azureAgentClient = sp.GetRequiredService<PersistentAgentsClient>();
var aiAgent = azureAgentClient.CreateAIAgent(
return azureAgentClient.CreateAIAgent(
deploymentName,
name: "GenerateStory",
instructions: "You are good at telling jokes.");
return aiAgent;
});
await using ServiceProvider serviceProvider = serviceCollection.BuildServiceProvider();