Roger Barreto
2025-04-11 14:24:18 +00:00
committed by GitHub
parent bae7e281ee
commit da331f65f9
47 changed files with 81 additions and 79 deletions
+2
View File
@@ -1,5 +1,7 @@
# Setting errors for SDK projects under samples folder
[*.cs]
indent_style = space
indent_size = 4
dotnet_diagnostic.CA2007.severity = error # Do not directly await a Task
dotnet_diagnostic.VSTHRD111.severity = error # Use .ConfigureAwait(bool)
dotnet_diagnostic.IDE1006.severity = error # Naming rule violations
@@ -7,7 +7,7 @@
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
<!-- Suppress: "Declare types in namespaces", "Require ConfigureAwait", "Experimental" -->
<NoWarn>$(NoWarn);CS8618,IDE0009,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0070,SKEXP0101</NoWarn>
<NoWarn>$(NoWarn);CS8618,IDE0009,IDE1006,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0070,SKEXP0101</NoWarn>
<OutputType>Library</OutputType>
<UserSecretsId>5ee045b0-aea3-4f08-8d31-32d1a6f8fed0</UserSecretsId>
</PropertyGroup>
@@ -14,7 +14,7 @@ public sealed class Step1_Create_Kernel(ITestOutputHelper output) : BaseTest(out
/// Show how to create a <see cref="Kernel"/> and use it to execute prompts.
/// </summary>
[Fact]
public async Task CreateKernelAsync()
public async Task CreateKernel()
{
// Create a kernel with OpenAI chat completion
Kernel kernel = Kernel.CreateBuilder()
@@ -17,7 +17,7 @@ public sealed class Step2_Add_Plugins(ITestOutputHelper output) : BaseTest(outpu
/// Shows different ways to load a <see cref="KernelPlugin"/> instances.
/// </summary>
[Fact]
public async Task AddPluginsAsync()
public async Task AddPlugins()
{
// Create a kernel with OpenAI chat completion
IKernelBuilder kernelBuilder = Kernel.CreateBuilder();
@@ -15,7 +15,7 @@ public sealed class Step3_Yaml_Prompt(ITestOutputHelper output) : BaseTest(outpu
/// Show how to create a prompt <see cref="KernelFunction"/> from a YAML resource.
/// </summary>
[Fact]
public async Task CreatePromptFromYamlAsync()
public async Task CreatePromptFromYaml()
{
// Create a kernel with OpenAI chat completion
Kernel kernel = Kernel.CreateBuilder()
@@ -16,7 +16,7 @@ public sealed class Step4_Dependency_Injection(ITestOutputHelper output) : BaseT
/// Show how to create a <see cref="Kernel"/> that participates in Dependency Injection.
/// </summary>
[Fact]
public async Task GetKernelUsingDependencyInjectionAsync()
public async Task GetKernelUsingDependencyInjection()
{
// If an application follows DI guidelines, the following line is unnecessary because DI will inject an instance of the KernelClient class to a class that references it.
// DI container guidelines - https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection-guidelines#recommendations
@@ -36,7 +36,7 @@ public sealed class Step4_Dependency_Injection(ITestOutputHelper output) : BaseT
/// Show how to use a plugin that participates in Dependency Injection.
/// </summary>
[Fact]
public async Task PluginUsingDependencyInjectionAsync()
public async Task PluginUsingDependencyInjection()
{
// If an application follows DI guidelines, the following line is unnecessary because DI will inject an instance of the KernelClient class to a class that references it.
// DI container guidelines - https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection-guidelines#recommendations
@@ -10,7 +10,7 @@ public sealed class Step5_Chat_Prompt(ITestOutputHelper output) : BaseTest(outpu
/// Show how to construct a chat prompt and invoke it.
/// </summary>
[Fact]
public async Task InvokeChatPromptAsync()
public async Task InvokeChatPrompt()
{
// Create a kernel with OpenAI chat completion
Kernel kernel = Kernel.CreateBuilder()
@@ -11,7 +11,7 @@ public sealed class Step6_Responsible_AI(ITestOutputHelper output) : BaseTest(ou
/// Show how to use prompt filters to ensure that prompts are rendered in a responsible manner.
/// </summary>
[Fact]
public async Task AddPromptFilterAsync()
public async Task AddPromptFilter()
{
// Create a kernel with OpenAI chat completion
var builder = Kernel.CreateBuilder()
@@ -13,7 +13,7 @@ public sealed class Step7_Observability(ITestOutputHelper output) : BaseTest(out
/// Shows how to observe the execution of a <see cref="KernelPlugin"/> instance with filters.
/// </summary>
[Fact]
public async Task ObservabilityWithFiltersAsync()
public async Task ObservabilityWithFilters()
{
// Create a kernel with OpenAI chat completion
IKernelBuilder kernelBuilder = Kernel.CreateBuilder();
@@ -14,7 +14,7 @@ public sealed class Step8_Pipelining(ITestOutputHelper output) : BaseTest(output
/// them in a sequence, passing the output from one as input to the next.
/// </summary>
[Fact]
public async Task CreateFunctionPipelineAsync()
public async Task CreateFunctionPipeline()
{
IKernelBuilder builder = Kernel.CreateBuilder();
builder.AddOpenAIChatCompletion(
@@ -15,7 +15,7 @@ public sealed class Step9_OpenAPI_Plugins(ITestOutputHelper output) : BaseTest(o
/// Shows how to load an Open API <see cref="KernelPlugin"/> instance.
/// </summary>
[Fact]
public async Task AddOpenAPIPluginsAsync()
public async Task AddOpenAPIPlugins()
{
// Create a kernel with OpenAI chat completion
IKernelBuilder kernelBuilder = Kernel.CreateBuilder();
@@ -36,7 +36,7 @@ public sealed class Step9_OpenAPI_Plugins(ITestOutputHelper output) : BaseTest(o
/// Shows how to transform an Open API <see cref="KernelPlugin"/> instance to support dependency injection.
/// </summary>
[Fact]
public async Task TransformOpenAPIPluginsAsync()
public async Task TransformOpenAPIPlugins()
{
// Create a kernel with OpenAI chat completion
var serviceProvider = BuildServiceProvider();
@@ -13,7 +13,7 @@ namespace GettingStarted.AzureAgents;
public class Step01_AzureAIAgent(ITestOutputHelper output) : BaseAzureAgentTest(output)
{
[Fact]
public async Task UseTemplateForAzureAgentAsync()
public async Task UseTemplateForAzureAgent()
{
// Define the agent
string generateStoryYaml = EmbeddedResource.Read("GenerateStory.yaml");
@@ -14,7 +14,7 @@ namespace GettingStarted.AzureAgents;
public class Step02_AzureAIAgent_Plugins(ITestOutputHelper output) : BaseAzureAgentTest(output)
{
[Fact]
public async Task UseAzureAgentWithPluginAsync()
public async Task UseAzureAgentWithPlugin()
{
// Define the agent
AzureAIAgent agent = await CreateAzureAgentAsync(
@@ -41,7 +41,7 @@ public class Step02_AzureAIAgent_Plugins(ITestOutputHelper output) : BaseAzureAg
}
[Fact]
public async Task UseAzureAgentWithPluginEnumParameterAsync()
public async Task UseAzureAgentWithPluginEnumParameter()
{
// Define the agent
AzureAIAgent agent = await CreateAzureAgentAsync(plugin: KernelPluginFactory.CreateFromType<WidgetFactory>());
@@ -36,7 +36,7 @@ public class Step03_AzureAIAgent_Chat(ITestOutputHelper output) : BaseAzureAgent
""";
[Fact]
public async Task UseGroupChatWithTwoAgentsAsync()
public async Task UseGroupChatWithTwoAgents()
{
// Define the agents
Agent reviewerModel = await this.AgentsClient.CreateAgentAsync(
@@ -12,7 +12,7 @@ namespace GettingStarted.AzureAgents;
public class Step04_AzureAIAgent_CodeInterpreter(ITestOutputHelper output) : BaseAzureAgentTest(output)
{
[Fact]
public async Task UseCodeInterpreterToolWithAgentAsync()
public async Task UseCodeInterpreterToolWithAgent()
{
// Define the agent
Azure.AI.Projects.Agent definition = await this.AgentsClient.CreateAgentAsync(
@@ -13,7 +13,7 @@ namespace GettingStarted.AzureAgents;
public class Step05_AzureAIAgent_FileSearch(ITestOutputHelper output) : BaseAzureAgentTest(output)
{
[Fact]
public async Task UseFileSearchToolWithAgentAsync()
public async Task UseFileSearchToolWithAgent()
{
// Define the agent
await using Stream stream = EmbeddedResource.ReadStream("employees.pdf")!;
@@ -17,7 +17,7 @@ namespace GettingStarted.AzureAgents;
public class Step06_AzureAIAgent_OpenAPI(ITestOutputHelper output) : BaseAzureAgentTest(output)
{
[Fact]
public async Task UseOpenAPIToolWithAgentAsync()
public async Task UseOpenAPIToolWithAgent()
{
// Retrieve Open API specifications
string apiCountries = EmbeddedResource.Read("countries.json");
@@ -18,7 +18,7 @@ public class Step07_AzureAIAgent_Functions(ITestOutputHelper output) : BaseAzure
private const string HostInstructions = "Answer questions about the menu.";
[Fact]
public async Task UseSingleAgentWithFunctionToolsAsync()
public async Task UseSingleAgentWithFunctionTools()
{
// Define the agent
// In this sample the function tools are added to the agent this is
@@ -21,7 +21,7 @@ public class Step08_AzureAIAgent_Declarative : BaseAzureAgentTest
/// Demonstrates creating and using a Chat Completion Agent with a Kernel.
/// </summary>
[Fact]
public async Task AzureAIAgentWithConfigurationAsync()
public async Task AzureAIAgentWithConfiguration()
{
var text =
"""
@@ -47,7 +47,7 @@ public class Step08_AzureAIAgent_Declarative : BaseAzureAgentTest
}
[Fact]
public async Task AzureAIAgentWithKernelAsync()
public async Task AzureAIAgentWithKernel()
{
var text =
"""
@@ -67,7 +67,7 @@ public class Step08_AzureAIAgent_Declarative : BaseAzureAgentTest
}
[Fact]
public async Task AzureAIAgentWithCodeInterpreterAsync()
public async Task AzureAIAgentWithCodeInterpreter()
{
var text =
"""
@@ -89,7 +89,7 @@ public class Step08_AzureAIAgent_Declarative : BaseAzureAgentTest
}
[Fact]
public async Task AzureAIAgentWithFunctionsAsync()
public async Task AzureAIAgentWithFunctions()
{
var text =
"""
@@ -127,7 +127,7 @@ public class Step08_AzureAIAgent_Declarative : BaseAzureAgentTest
}
[Fact]
public async Task AzureAIAgentWithBingGroundingAsync()
public async Task AzureAIAgentWithBingGrounding()
{
var text =
$"""
@@ -157,7 +157,7 @@ public class Step08_AzureAIAgent_Declarative : BaseAzureAgentTest
}
[Fact]
public async Task AzureAIAgentWithFileSearchAsync()
public async Task AzureAIAgentWithFileSearch()
{
var text =
$"""
@@ -188,7 +188,7 @@ public class Step08_AzureAIAgent_Declarative : BaseAzureAgentTest
}
[Fact]
public async Task AzureAIAgentWithOpenAPIAsync()
public async Task AzureAIAgentWithOpenAPI()
{
var text =
"""
@@ -278,7 +278,7 @@ public class Step08_AzureAIAgent_Declarative : BaseAzureAgentTest
}
[Fact]
public async Task AzureAIAgentWithOpenAPIYamlAsync()
public async Task AzureAIAgentWithOpenAPIYaml()
{
var text =
"""
@@ -345,7 +345,7 @@ public class Step08_AzureAIAgent_Declarative : BaseAzureAgentTest
}
[Fact]
public async Task AzureAIAgentWithTemplateAsync()
public async Task AzureAIAgentWithTemplate()
{
var text =
"""
@@ -19,7 +19,7 @@ public class Step01_BedrockAgent(ITestOutputHelper output) : BaseBedrockAgentTes
/// The agent will respond to the user query.
/// </summary>
[Fact]
public async Task UseNewAgentAsync()
public async Task UseNewAgent()
{
// Create the agent
var bedrockAgent = await this.CreateAgentAsync("Step01_BedrockAgent");
@@ -46,7 +46,7 @@ public class Step01_BedrockAgent(ITestOutputHelper output) : BaseBedrockAgentTes
/// The agent will respond to the user query.
/// </summary>
[Fact]
public async Task UseExistingAgentAsync()
public async Task UseExistingAgent()
{
// Retrieve the agent
// Replace "bedrock-agent-id" with the ID of the agent you want to use
@@ -75,7 +75,7 @@ public class Step01_BedrockAgent(ITestOutputHelper output) : BaseBedrockAgentTes
/// The agent will respond to the user query.
/// </summary>
[Fact]
public async Task UseNewAgentStreamingAsync()
public async Task UseNewAgentStreaming()
{
// Create the agent
var bedrockAgent = await this.CreateAgentAsync("Step01_BedrockAgent_Streaming");
@@ -26,7 +26,7 @@ Dolphin 2";
/// The output of the code interpreter will be a file containing the bar chart, which will be returned to the user.
/// </summary>
[Fact]
public async Task UseAgentWithCodeInterpreterAsync()
public async Task UseAgentWithCodeInterpreter()
{
// Create the agent
var bedrockAgent = await this.CreateAgentAsync("Step02_BedrockAgent_CodeInterpreter");
@@ -17,7 +17,7 @@ public class Step03_BedrockAgent_Functions(ITestOutputHelper output) : BaseBedro
/// The agent will respond to the user query by calling kernel functions to provide weather information.
/// </summary>
[Fact]
public async Task UseAgentWithFunctionsAsync()
public async Task UseAgentWithFunctions()
{
// Create the agent
var bedrockAgent = await this.CreateAgentAsync("Step03_BedrockAgent_Functions");
@@ -48,7 +48,7 @@ public class Step03_BedrockAgent_Functions(ITestOutputHelper output) : BaseBedro
/// information about the menu.
/// </summary>
[Fact]
public async Task UseAgentWithFunctionsComplexTypeAsync()
public async Task UseAgentWithFunctionsComplexType()
{
// Create the agent
var bedrockAgent = await this.CreateAgentAsync("Step03_BedrockAgent_Functions_Complex_Types");
@@ -78,7 +78,7 @@ public class Step03_BedrockAgent_Functions(ITestOutputHelper output) : BaseBedro
/// The agent will respond to the user query by calling kernel functions to provide weather information.
/// </summary>
[Fact]
public async Task UseAgentStreamingWithFunctionsAsync()
public async Task UseAgentStreamingWithFunctions()
{
// Create the agent
var bedrockAgent = await this.CreateAgentAsync("Step03_BedrockAgent_Functions_Streaming");
@@ -20,7 +20,7 @@ public class Step04_BedrockAgent_Trace(ITestOutputHelper output) : BaseBedrockAg
/// Demonstrates how to inspect the thought process of a <see cref="BedrockAgent"/> by enabling trace.
/// </summary>
[Fact]
public async Task UseAgentWithTraceAsync()
public async Task UseAgentWithTrace()
{
// Create the agent
var bedrockAgent = await this.CreateAgentAsync("Step04_BedrockAgent_Trace");
@@ -39,7 +39,7 @@ public class Step05_BedrockAgent_FileSearch(ITestOutputHelper output) : BaseBedr
/// Demonstrates how to use a <see cref="BedrockAgent"/> with file search.
/// </summary>
[Fact(Skip = "This test is skipped because it requires a valid KnowledgeBaseId.")]
public async Task UseAgentWithFileSearchAsync()
public async Task UseAgentWithFileSearch()
{
// Create the agent
var bedrockAgent = await this.CreateAgentAsync("Step05_BedrockAgent_FileSearch");
@@ -26,7 +26,7 @@ public class Step06_BedrockAgent_AgentChat(ITestOutputHelper output) : BaseBedro
/// Demonstrates how to put two <see cref="BedrockAgent"/> instances in a chat.
/// </summary>
[Fact]
public async Task UseAgentWithAgentChatAsync()
public async Task UseAgentWithAgentChat()
{
// Create the agent
var bedrockAgent = await this.CreateAgentAsync("Step06_BedrockAgent_AgentChat");
@@ -18,7 +18,7 @@ public class Step07_BedrockAgent_Declarative : BaseBedrockAgentTest
/// Demonstrates creating and using a Bedrock Agent with using configuration settings.
/// </summary>
[Fact]
public async Task BedrockAgentWithConfigurationAsync()
public async Task BedrockAgentWithConfiguration()
{
var text =
"""
@@ -43,7 +43,7 @@ public class Step07_BedrockAgent_Declarative : BaseBedrockAgentTest
/// Demonstrates creating and using a Bedrock Agent with a code interpreter.
/// </summary>
[Fact]
public async Task BedrockAgentWithCodeInterpreterAsync()
public async Task BedrockAgentWithCodeInterpreter()
{
var text =
"""
@@ -70,7 +70,7 @@ public class Step07_BedrockAgent_Declarative : BaseBedrockAgentTest
/// Demonstrates creating and using a Bedrock Agent with functions.
/// </summary>
[Fact]
public async Task BedrockAgentWithFunctionsAsync()
public async Task BedrockAgentWithFunctions()
{
var text =
"""
@@ -117,7 +117,7 @@ public class Step07_BedrockAgent_Declarative : BaseBedrockAgentTest
/// Demonstrates creating and using a Bedrock Agent with a knowledge base.
/// </summary>
[Fact]
public async Task BedrockAgentWithKnowledgeBaseAsync()
public async Task BedrockAgentWithKnowledgeBase()
{
var text =
"""
@@ -9,7 +9,7 @@
<IsTestProject>true</IsTestProject>
<RootNamespace></RootNamespace>
<!-- Suppress: "Declare types in namespaces", "Require ConfigureAwait", "Experimental" -->
<NoWarn>$(NoWarn);CS8618,IDE0009,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0070,SKEXP0101,SKEXP0110,OPENAI001</NoWarn>
<NoWarn>$(NoWarn);CS8618,IDE0009,IDE1006,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0070,SKEXP0101,SKEXP0110,OPENAI001</NoWarn>
<OutputType>Library</OutputType>
<UserSecretsId>5ee045b0-aea3-4f08-8d31-32d1a6f8fed0</UserSecretsId>
</PropertyGroup>
@@ -13,7 +13,7 @@ namespace GettingStarted.OpenAIAssistants;
public class Step01_Assistant(ITestOutputHelper output) : BaseAssistantTest(output)
{
[Fact]
public async Task UseTemplateForAssistantAgentAsync()
public async Task UseTemplateForAssistantAgent()
{
// Define the agent
string generateStoryYaml = EmbeddedResource.Read("GenerateStory.yaml");
@@ -15,7 +15,7 @@ namespace GettingStarted.OpenAIAssistants;
public class Step02_Assistant_Plugins(ITestOutputHelper output) : BaseAssistantTest(output)
{
[Fact]
public async Task UseAssistantWithPluginAsync()
public async Task UseAssistantWithPlugin()
{
// Define the agent
OpenAIAssistantAgent agent = await CreateAssistantAgentAsync(
@@ -42,7 +42,7 @@ public class Step02_Assistant_Plugins(ITestOutputHelper output) : BaseAssistantT
}
[Fact]
public async Task UseAssistantWithPluginEnumParameterAsync()
public async Task UseAssistantWithPluginEnumParameter()
{
// Define the agent
OpenAIAssistantAgent agent = await CreateAssistantAgentAsync(plugin: KernelPluginFactory.CreateFromType<WidgetFactory>());
@@ -19,7 +19,7 @@ public class Step03_Assistant_Vision(ITestOutputHelper output) : BaseAssistantTe
protected override bool ForceOpenAI => true;
[Fact]
public async Task UseImageContentWithAssistantAsync()
public async Task UseImageContentWithAssistant()
{
// Define the assistant
Assistant assistant =
@@ -13,7 +13,7 @@ namespace GettingStarted.OpenAIAssistants;
public class Step04_AssistantTool_CodeInterpreter(ITestOutputHelper output) : BaseAssistantTest(output)
{
[Fact]
public async Task UseCodeInterpreterToolWithAssistantAgentAsync()
public async Task UseCodeInterpreterToolWithAssistantAgent()
{
// Define the assistant
Assistant assistant =
@@ -15,7 +15,7 @@ namespace GettingStarted.OpenAIAssistants;
public class Step05_AssistantTool_FileSearch(ITestOutputHelper output) : BaseAssistantTest(output)
{
[Fact]
public async Task UseFileSearchToolWithAssistantAgentAsync()
public async Task UseFileSearchToolWithAssistantAgent()
{
// Define the assistant
Assistant assistant =
@@ -19,7 +19,7 @@ public class Step06_AssistantTool_Function(ITestOutputHelper output) : BaseAssis
private const string HostInstructions = "Answer questions about the menu.";
[Fact]
public async Task UseSingleAssistantWithFunctionToolsAsync()
public async Task UseSingleAssistantWithFunctionTools()
{
// Define the agent
AssistantCreationOptions creationOptions =
@@ -19,7 +19,7 @@ public class Step07_Assistant_Declarative : BaseAssistantTest
/// Demonstrates creating and using a OpenAI Assistant using configuration.
/// </summary>
[Fact]
public async Task OpenAIAssistantAgentWithConfigurationForOpenAIAsync()
public async Task OpenAIAssistantAgentWithConfigurationForOpenAI()
{
var text =
"""
@@ -44,7 +44,7 @@ public class Step07_Assistant_Declarative : BaseAssistantTest
/// Demonstrates creating and using a OpenAI Assistant using configuration for Azure OpenAI.
/// </summary>
[Fact]
public async Task OpenAIAssistantAgentWithConfigurationForAzureOpenAIAsync()
public async Task OpenAIAssistantAgentWithConfigurationForAzureOpenAI()
{
var text =
"""
@@ -73,7 +73,7 @@ public class Step07_Assistant_Declarative : BaseAssistantTest
/// Demonstrates creating and using a OpenAI Assistant using a Kernel.
/// </summary>
[Fact]
public async Task OpenAIAssistantAgentWithKernelAsync()
public async Task OpenAIAssistantAgentWithKernel()
{
var text =
"""
@@ -95,7 +95,7 @@ public class Step07_Assistant_Declarative : BaseAssistantTest
/// Demonstrates creating and using a OpenAI Assistant with templated instructions.
/// </summary>
[Fact]
public async Task OpenAIAssistantAgentWithTemplateAsync()
public async Task OpenAIAssistantAgentWithTemplate()
{
var text =
"""
@@ -23,7 +23,7 @@ public class Step01_Agent(ITestOutputHelper output) : BaseAgentsTest(output)
/// a unique interaction with no conversation history between them.
/// </summary>
[Fact]
public async Task UseSingleChatCompletionAgentAsync()
public async Task UseSingleChatCompletionAgent()
{
Kernel kernel = this.CreateKernelWithChatCompletion();
@@ -58,7 +58,7 @@ public class Step01_Agent(ITestOutputHelper output) : BaseAgentsTest(output)
/// Demonstrate the usage of <see cref="ChatCompletionAgent"/> where a conversation history is maintained.
/// </summary>
[Fact]
public async Task UseSingleChatCompletionAgentWithConversationAsync()
public async Task UseSingleChatCompletionAgentWithConversation()
{
Kernel kernel = this.CreateKernelWithChatCompletion();
@@ -99,7 +99,7 @@ public class Step01_Agent(ITestOutputHelper output) : BaseAgentsTest(output)
/// and where the thread containing the conversation is created manually.
/// </summary>
[Fact]
public async Task UseSingleChatCompletionAgentWithManuallyCreatedThreadAsync()
public async Task UseSingleChatCompletionAgentWithManuallyCreatedThread()
{
Kernel kernel = this.CreateKernelWithChatCompletion();
@@ -139,7 +139,7 @@ public class Step01_Agent(ITestOutputHelper output) : BaseAgentsTest(output)
}
[Fact]
public async Task UseTemplateForChatCompletionAgentAsync()
public async Task UseTemplateForChatCompletionAgent()
{
// Define the agent
string generateStoryYaml = EmbeddedResource.Read("GenerateStory.yaml");
@@ -14,7 +14,7 @@ namespace GettingStarted;
public class Step02_Plugins(ITestOutputHelper output) : BaseAgentsTest(output)
{
[Fact]
public async Task UseChatCompletionWithPluginAsync()
public async Task UseChatCompletionWithPlugin()
{
// Define the agent
ChatCompletionAgent agent = CreateAgentWithPlugin(
@@ -33,7 +33,7 @@ public class Step02_Plugins(ITestOutputHelper output) : BaseAgentsTest(output)
}
[Fact]
public async Task UseChatCompletionWithPluginEnumParameterAsync()
public async Task UseChatCompletionWithPluginEnumParameter()
{
// Define the agent
ChatCompletionAgent agent = CreateAgentWithPlugin(
@@ -47,7 +47,7 @@ public class Step02_Plugins(ITestOutputHelper output) : BaseAgentsTest(output)
}
[Fact]
public async Task UseChatCompletionWithTemplateExecutionSettingsAsync()
public async Task UseChatCompletionWithTemplateExecutionSettings()
{
// Read the template resource
string autoInvokeYaml = EmbeddedResource.Read("AutoInvokeTools.yaml");
@@ -34,7 +34,7 @@ public class Step03_Chat(ITestOutputHelper output) : BaseAgentsTest(output)
""";
[Fact]
public async Task UseAgentGroupChatWithTwoAgentsAsync()
public async Task UseAgentGroupChatWithTwoAgents()
{
// Define the agents
ChatCompletionAgent agentReviewer =
@@ -35,7 +35,7 @@ public class Step04_KernelFunctionStrategies(ITestOutputHelper output) : BaseAge
""";
[Fact]
public async Task UseKernelFunctionStrategiesWithAgentGroupChatAsync()
public async Task UseKernelFunctionStrategiesWithAgentGroupChat()
{
// Define the agents
ChatCompletionAgent agentReviewer =
@@ -28,7 +28,7 @@ public class Step05_JsonResult(ITestOutputHelper output) : BaseAgentsTest(output
""";
[Fact]
public async Task UseKernelFunctionStrategiesWithJsonResultAsync()
public async Task UseKernelFunctionStrategiesWithJsonResult()
{
// Define the agents
ChatCompletionAgent agent =
@@ -27,7 +27,7 @@ public class Step06_DependencyInjection(ITestOutputHelper output) : BaseAgentsTe
""";
[Fact]
public async Task UseDependencyInjectionToCreateAgentAsync()
public async Task UseDependencyInjectionToCreateAgent()
{
ServiceCollection serviceContainer = new();
@@ -32,7 +32,7 @@ public class Step07_Telemetry(ITestOutputHelper output) : BaseAssistantTest(outp
/// This example uses <see cref="XunitLogger"/> to output logs to the test console, but any compatible logging provider can be used.
/// </summary>
[Fact]
public async Task LoggingAsync()
public async Task Logging()
{
await RunExampleAsync(loggerFactory: this.LoggerFactory);
@@ -55,7 +55,7 @@ public class Step07_Telemetry(ITestOutputHelper output) : BaseAssistantTest(outp
[InlineData(false, false)]
[InlineData(true, true)]
[InlineData(false, true)]
public async Task TracingAsync(bool useApplicationInsights, bool useStreaming)
public async Task Tracing(bool useApplicationInsights, bool useStreaming)
{
using var tracerProvider = GetTracerProvider(useApplicationInsights);
@@ -15,7 +15,7 @@ public class Step08_AgentAsKernelFunction(ITestOutputHelper output) : BaseAgents
protected override bool ForceOpenAI { get; } = true;
[Fact]
public async Task SalesAssistantAgentAsync()
public async Task SalesAssistantAgent()
{
Kernel kernel = this.CreateKernelWithChatCompletion();
kernel.Plugins.AddFromType<OrderPlugin>();
@@ -40,7 +40,7 @@ public class Step08_AgentAsKernelFunction(ITestOutputHelper output) : BaseAgents
}
[Fact]
public async Task RefundAgentAsync()
public async Task RefundAgent()
{
Kernel kernel = this.CreateKernelWithChatCompletion();
kernel.Plugins.AddFromType<RefundPlugin>();
@@ -65,7 +65,7 @@ public class Step08_AgentAsKernelFunction(ITestOutputHelper output) : BaseAgents
}
[Fact]
public async Task MultipleAgentsAsync()
public async Task MultipleAgents()
{
Kernel kernel = this.CreateKernelWithChatCompletion();
var agentPlugin = KernelPluginFactory.CreateFromFunctions("AgentPlugin",
@@ -16,7 +16,7 @@ public class Step09_Declarative(ITestOutputHelper output) : BaseAgentsTest(outpu
/// Demonstrates creating and using a Chat Completion Agent with a Kernel.
/// </summary>
[Fact]
public async Task ChatCompletionAgentWithKernelAsync()
public async Task ChatCompletionAgentWithKernel()
{
Kernel kernel = this.CreateKernelWithChatCompletion();
@@ -41,7 +41,7 @@ public class Step09_Declarative(ITestOutputHelper output) : BaseAgentsTest(outpu
/// Demonstrates creating and using a Chat Completion Agent with functions.
/// </summary>
[Fact]
public async Task ChatCompletionAgentWithFunctionsAsync()
public async Task ChatCompletionAgentWithFunctions()
{
Kernel kernel = this.CreateKernelWithChatCompletion();
KernelPlugin plugin = KernelPluginFactory.CreateFromType<MenuPlugin>();
@@ -76,7 +76,7 @@ public class Step09_Declarative(ITestOutputHelper output) : BaseAgentsTest(outpu
/// Demonstrates creating and using a Chat Completion Agent with templated instructions.
/// </summary>
[Fact]
public async Task ChatCompletionAgentWithTemplateAsync()
public async Task ChatCompletionAgentWithTemplate()
{
Kernel kernel = this.CreateKernelWithChatCompletion();
@@ -22,7 +22,7 @@ public class Step10_MultiAgent_Declarative : BaseAgentsTest
/// Demonstrates creating and using a Chat Completion Agent with a Kernel.
/// </summary>
[Fact]
public async Task ChatCompletionAgentWithKernelAsync()
public async Task ChatCompletionAgentWithKernel()
{
Kernel kernel = this.CreateKernelWithChatCompletion();
@@ -46,7 +46,7 @@ public class Step10_MultiAgent_Declarative : BaseAgentsTest
/// Demonstrates creating and using an Azure AI Agent with a Kernel.
/// </summary>
[Fact]
public async Task AzureAIAgentWithKernelAsync()
public async Task AzureAIAgentWithKernel()
{
var text =
"""
@@ -10,7 +10,7 @@
<RootNamespace></RootNamespace>
<!-- Suppress: "Declare types in namespaces", "Require ConfigureAwait", "Experimental" -->
<NoWarn>
$(NoWarn);CS8618,IDE0009,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0070,SKEXP0080,SKEXP0101,SKEXP0110,OPENAI001
$(NoWarn);CS8618,IDE0009,IDE1006,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0070,SKEXP0080,SKEXP0101,SKEXP0110,OPENAI001
</NoWarn>
<OutputType>Library</OutputType>
<UserSecretsId>5ee045b0-aea3-4f08-8d31-32d1a6f8fed0</UserSecretsId>
@@ -7,7 +7,7 @@
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
<!-- Suppress: "Declare types in namespaces", "Require ConfigureAwait", "Experimental" -->
<NoWarn>$(NoWarn);CS8618,IDE0009,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0070,SKEXP0101</NoWarn>
<NoWarn>$(NoWarn);CS8618,IDE0009,IDE1006,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0070,SKEXP0101</NoWarn>
<OutputType>Library</OutputType>
<UserSecretsId>5ee045b0-aea3-4f08-8d31-32d1a6f8fed0</UserSecretsId>
</PropertyGroup>
@@ -7,7 +7,7 @@
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
<!-- Suppress: "Declare types in namespaces", "Require ConfigureAwait", "Experimental" -->
<NoWarn>$(NoWarn);CS8618,IDE0009,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0070,SKEXP0101</NoWarn>
<NoWarn>$(NoWarn);CS8618,IDE0009,IDE1006,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0070,SKEXP0101</NoWarn>
<OutputType>Library</OutputType>
<UserSecretsId>5ee045b0-aea3-4f08-8d31-32d1a6f8fed0</UserSecretsId>
</PropertyGroup>