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

.Net: Respect Kernel plugin changes made during function auto-invocation #5376

Merged
merged 2 commits into from
Mar 8, 2024

Conversation

stephentoub
Copy link
Member

A KernelFunction can change when plug-ins are in the Kernel. Today, we build up the list of tools at the beginning of the auto-invocation loop but then don't update the list after a function has been invoked, which means those updates won't be reflected in subsequent calls made as part of the response to the LLM. This PR updates the loop to regenerate the tool call information after each function invocation, in case they've been changed dynamically.

Fixes #4785

A KernelFunction can change when plug-ins are in the Kernel. Today, we build up the list of tools at the beginning of the auto-invocation loop but then don't update the list after a function has been invoked, which means those updates won't be reflected in subsequent calls made as part of the response to the LLM.  This PR updates the loop to regenerate the tool call information after each function invocation, in case they've been changed dynamically.
@stephentoub stephentoub requested a review from a team as a code owner March 7, 2024 16:08
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels Mar 7, 2024
@github-actions github-actions bot changed the title Respect Kernel plugin changes made during function auto-invocation .Net: Respect Kernel plugin changes made during function auto-invocation Mar 7, 2024
Krzysztof318 added a commit to Krzysztof318/semantic-kernel that referenced this pull request Mar 8, 2024
@SergeyMenshykh SergeyMenshykh added this pull request to the merge queue Mar 8, 2024
Merged via the queue into microsoft:main with commit 4fb351d Mar 8, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow importing functions to kernel within a running function so that AI can use that in the next response
3 participants