Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing TrustService from Kernel.Core (to become extension) #1895

Merged
merged 5 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Orchestration;
using Microsoft.SemanticKernel.Planning;
using Microsoft.SemanticKernel.Security;
using Microsoft.SemanticKernel.SemanticFunctions;
using Microsoft.SemanticKernel.SkillDefinition;
using Moq;
Expand Down Expand Up @@ -144,8 +143,7 @@ private Mock<IKernel> CreateMockKernelAndFunctionFlowWithTestString(string testP
kernel.Setup(x => x.RegisterSemanticFunction(
It.IsAny<string>(),
It.IsAny<string>(),
It.IsAny<SemanticFunctionConfig>(),
It.IsAny<ITrustService?>()
It.IsAny<SemanticFunctionConfig>()
)).Returns(mockFunctionFlowFunction.Object);

return kernel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.SemanticKernel.Orchestration;
using Microsoft.SemanticKernel.Planning;
using Microsoft.SemanticKernel.Planning.Sequential;
using Microsoft.SemanticKernel.Security;
using Microsoft.SemanticKernel.SemanticFunctions;
using Microsoft.SemanticKernel.SkillDefinition;
using Moq;
Expand Down Expand Up @@ -86,8 +85,7 @@ private void CreateKernelAndFunctionCreateMocks(List<(string name, string skillN
kernelMock.Setup(x => x.RegisterSemanticFunction(
It.IsAny<string>(),
It.IsAny<string>(),
It.IsAny<SemanticFunctionConfig>(),
It.IsAny<ITrustService?>()
It.IsAny<SemanticFunctionConfig>()
)).Returns(mockFunction.Object);
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Orchestration;
using Microsoft.SemanticKernel.Planning;
using Microsoft.SemanticKernel.Security;
using Microsoft.SemanticKernel.SemanticFunctions;
using Microsoft.SemanticKernel.SkillDefinition;
using Moq;
Expand Down Expand Up @@ -104,8 +103,7 @@ public async Task ItCanCreatePlanAsync(string goal)
kernel.Setup(x => x.RegisterSemanticFunction(
It.IsAny<string>(),
It.IsAny<string>(),
It.IsAny<SemanticFunctionConfig>(),
It.IsAny<ITrustService?>()
It.IsAny<SemanticFunctionConfig>()
)).Returns(mockFunctionFlowFunction.Object);

var planner = new Microsoft.SemanticKernel.Planning.SequentialPlanner(kernel.Object);
Expand Down Expand Up @@ -192,8 +190,7 @@ public async Task InvalidXMLThrowsAsync()
kernel.Setup(x => x.RegisterSemanticFunction(
It.IsAny<string>(),
It.IsAny<string>(),
It.IsAny<SemanticFunctionConfig>(),
It.IsAny<ITrustService?>()
It.IsAny<SemanticFunctionConfig>()
)).Returns(mockFunctionFlowFunction.Object);

var planner = new Microsoft.SemanticKernel.Planning.SequentialPlanner(kernel.Object);
Expand Down
4 changes: 0 additions & 4 deletions dotnet/src/IntegrationTests/Planning/PlanTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ public async Task CanExecutePanWithTreeStepsAsync()
}

[Theory]
[InlineData(null, "Write a poem or joke and send it in an e-mail to Kai.", null)]
[InlineData("", "Write a poem or joke and send it in an e-mail to Kai.", "")]
[InlineData("Hello World!", "Write a poem or joke and send it in an e-mail to Kai.", "some_email@email.com")]
public async Task CanExecuteRunPlanSimpleManualStateAsync(string input, string goal, string email)
Expand Down Expand Up @@ -180,7 +179,6 @@ public async Task CanExecuteRunPlanSimpleManualStateAsync(string input, string g
}

[Theory]
[InlineData(null, "Write a poem or joke and send it in an e-mail to Kai.", null)]
[InlineData("", "Write a poem or joke and send it in an e-mail to Kai.", "")]
[InlineData("Hello World!", "Write a poem or joke and send it in an e-mail to Kai.", "some_email@email.com")]
public async Task CanExecuteRunPlanSimpleManualStateNoVariableAsync(string input, string goal, string email)
Expand Down Expand Up @@ -214,14 +212,12 @@ public async Task CanExecuteRunPlanSimpleManualStateNoVariableAsync(string input
}

[Theory]
[InlineData(null, "Write a poem or joke and send it in an e-mail to Kai.", null)]
[InlineData("", "Write a poem or joke and send it in an e-mail to Kai.", "")]
[InlineData("Hello World!", "Write a poem or joke and send it in an e-mail to Kai.", "some_email@email.com")]
public async Task CanExecuteRunPlanManualStateAsync(string input, string goal, string email)
{
// Arrange
IKernel target = this.InitializeKernel();

var emailSkill = target.ImportSkill(new EmailSkillFake());

// Create the input mapping from parent (plan) plan state to child plan (sendEmailPlan) state.
Expand Down
Loading
Loading