Skip to content

.Net: New Feature: Function invocation approval in realistic scenario #11643

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

Open
RamType0 opened this issue Apr 18, 2025 · 1 comment
Open
Assignees
Labels
.NET Issue or Pull requests regarding .NET code

Comments

@RamType0
Copy link
Contributor


name: Feature request
about: Suggest an idea for this project


I am using semantic kernel to make LLM integrated app.
It is hosted on ASP.NET Core SignalR, and users receive LLM generated response as IAsyncEnumerable.

public class SignalRHub : Hub
{

    public IAsyncEnumerable<ResponsePart> GetChatResponseStreamingAsync(UserMessage userMessage);

}

In this scenario, how could we implement function invocation approval system easily?
Function invocation approval is well-known use case, as it is provided as sample.
But we could not use the solution which the sample is using.

In my scenario, We should do following steps

  1. Ask user for approval to invoke function.
  2. Receive invocation approval result from user.
  3. Resume function invocation if the user approved its invocation.

But there is no API to pause function invocation and resume it after.

Another way to do this is to ask user for approval by sending other message from server, and not to send approval request as one of the yielded response from IAsyncEnumerable.

But this solution makes the client side execution flow to complicated, and also lead SignalR timeout(due to too long duration between yielding element from IAsyncEnumerable).

I know that we could implement this feature via manual function invocation, but it requires lots of code.

@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Apr 18, 2025
@github-actions github-actions bot changed the title New Feature: Function invocation approval in realistic scenario .Net: New Feature: Function invocation approval in realistic scenario Apr 18, 2025
@markwallace-microsoft
Copy link
Member

@dmytrostruk could you take a look at this issue to see can we support this use case.

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
Status: No status
Development

No branches or pull requests

3 participants