diff --git a/.github/workflows/check-coverage.ps1 b/.github/workflows/check-coverage.ps1 index 1bde0249eeaa..0e247aad1847 100644 --- a/.github/workflows/check-coverage.ps1 +++ b/.github/workflows/check-coverage.ps1 @@ -12,7 +12,6 @@ $assembliesCollection = @( 'Microsoft.SemanticKernel.Abstractions' 'Microsoft.SemanticKernel.Core' 'Microsoft.SemanticKernel.PromptTemplates.Handlebars' - 'Microsoft.SemanticKernel.Connectors.OpenAI' 'Microsoft.SemanticKernel.Connectors.AzureOpenAI' 'Microsoft.SemanticKernel.Yaml' 'Microsoft.SemanticKernel.Agents.Abstractions' diff --git a/dotnet/src/Agents/UnitTests/Yaml/KernelAgentYamlTests.cs b/dotnet/src/Agents/UnitTests/Yaml/KernelAgentYamlTests.cs index d2676da45ec6..c15cd02f7aa0 100644 --- a/dotnet/src/Agents/UnitTests/Yaml/KernelAgentYamlTests.cs +++ b/dotnet/src/Agents/UnitTests/Yaml/KernelAgentYamlTests.cs @@ -60,6 +60,55 @@ public void Dispose() this._httpClient.Dispose(); } + /// + /// Verify can create an instance of from YAML text. + /// + [Fact] + public void VerifyAgentDefinitionFromYaml() + { + // Arrange + var text = + """ + version: 1.0.0 + type: chat_completion_agent + name: ChatCompletionAgent + description: ChatCompletionAgent Description + instructions: ChatCompletionAgent Instructions + metadata: + author: Microsoft + created: 2025-02-21 + model: + id: gpt-4o-mini + options: + temperature: 0.4 + function_choice_behavior: + type: auto + configuration: + type: azureai + inputs: + - name: input1 + description: input1 description + - name: input2 + description: input2 description + outputs: + - description: output1 description + template: + format: liquid + parser: semantic-kernel + tools: + - name: tool1 + type: code_interpreter + - name: tool2 + type: file_search + """; + + // Act + var agentDefinition = AgentDefinitionYaml.FromYaml(text); + + // Assert + Assert.NotNull(agentDefinition); + } + /// /// Verify can create an instance of using ///