Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.Net: Fix: telemetry sample app repeated calls to the same registered…
… function (#6544) ### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> 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](https://github.com/microsoft/semantic-kernel/assets/12570346/d046e6b7-7220-4af9-aaa0-a198512e2864) This is related to: #6154, #6281 ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> 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 <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
- Loading branch information