Skip to content

Commit

Permalink
Remove agents.openai from code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
markwallace-microsoft committed Feb 21, 2025
1 parent adbe914 commit d961a0a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/check-coverage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
49 changes: 49 additions & 0 deletions dotnet/src/Agents/UnitTests/Yaml/KernelAgentYamlTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,55 @@ public void Dispose()
this._httpClient.Dispose();
}

/// <summary>
/// Verify can create an instance of <see cref="AgentDefinition"/> from YAML text.
/// </summary>
[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);
}

/// <summary>
/// Verify can create an instance of <see cref="KernelAgent"/> using <see cref="ChatCompletionAgentFactory"/>
/// </summary>
Expand Down

0 comments on commit d961a0a

Please sign in to comment.