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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Fix: telemetry sample app repeated calls to the same registered function #6544

Conversation

TaoChenOSU
Copy link
Contributor

Motivation and Context

Previously inside the telemetry sample app, the code registers a prompt-based plugin to the kernel and then invokes the plugin directly via InvokeAsync(). This is actually against the pattern we recommend. The direct result of this is the models with function calling feature could potentially invoke the same function repeatedly.
image

This is related to: #6154, #6281

Description

Instead of registering the plugin to the kernel for later use, we create the plugin without registering it to the kernel, so that the model doesn't have the same function at its disposal when completing a response.

Contribution Checklist

@TaoChenOSU TaoChenOSU self-assigned this Jun 4, 2024
@TaoChenOSU TaoChenOSU requested a review from a team as a code owner June 4, 2024 18:27
@markwallace-microsoft markwallace-microsoft added the .NET Issue or Pull requests regarding .NET code label Jun 4, 2024
@github-actions github-actions bot changed the title Fix: telemetry sample app repeated calls to the same registered function .Net: Fix: telemetry sample app repeated calls to the same registered function Jun 4, 2024
@TaoChenOSU TaoChenOSU enabled auto-merge June 4, 2024 18:34
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Jun 4, 2024
Merged via the queue into microsoft:main with commit 9af6cd6 Jun 4, 2024
15 checks passed
@TaoChenOSU TaoChenOSU deleted the taochen/fix-telemetry-sample-app-repeated-calls branch June 4, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants