-
Notifications
You must be signed in to change notification settings - Fork 4k
.Net: Allow Kernel to be mutable by AgentChatCompletions #12538
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
base: main
Are you sure you want to change the base?
.Net: Allow Kernel to be mutable by AgentChatCompletions #12538
Conversation
@RogerBarreto is this integration test failure related to your changes?
|
@@ -73,7 +73,7 @@ public override async IAsyncEnumerable<AgentResponseItem<ChatMessageContent>> In | |||
() => new ChatHistoryAgentThread(), | |||
cancellationToken).ConfigureAwait(false); | |||
|
|||
Kernel kernel = (options?.Kernel ?? this.Kernel).Clone(); | |||
Kernel kernel = options?.Kernel ?? this.Kernel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will result in a regression elsewhere, since it means that AIContextProviders will permanently mutate the kernel plugin list, and this mutation is expected to be per iteration only.
Let's discuss this further in the standup before committing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss this further in the standup before committing.
Agree, actually the AIContext
feature introduced this regression. I'm happy suggesting an alternative path for impacted customers using Agents
with "Kernel data based functions".
@markwallace-microsoft This is unrelated error, I tried to run against my local configuration in Azure IT tests and passed as expected. |
Motivation and Context
Fixes .Net: Bug: Kernel.Data no longer retains information across plugins since v1.54 #12534
This regression seems to be part of .Net: Add AIContextProvider support to Semantic Kernel #11689 where
kernel
instance was is cloned prior agent iterations, as I didn't captured any failing unit tests for the addedAIContext
providers considering this as a valid fix.Added UT covering the expected
Kernel
mutability.