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: Pausing Tool Calls in C# Semantic Kernel to Request User Input #10679

Open
sophialagerkranspandey opened this issue Feb 25, 2025 · 0 comments
Assignees
Labels
.NET Issue or Pull requests regarding .NET code

Comments

@sophialagerkranspandey
Copy link
Contributor

Discussed in #10673

Originally posted by StefandewitSPS February 25, 2025
I am using C# Semantic Kernel (1.38.0-alpha). I am wondering how I can temporarily stop the model from making tool calls to, for example, ask the user an intermediate question.

An example of this:

User input: "Give me the information about organization 'example'."

Now, a kernel function is called, which returns three results. Before the model proceeds with calling other functions, I want the user to first choose one of the organizations.

I tried solving this using an IAutoFunctionInvocationFilter, but it does not work when I set a schema on an agent using AssistantResponseFormat.CreateJsonSchemaFormat(). However, if I change this JSON schema to another option in the class, such as AssistantResponseFormat.JsonObject, it does work.

Could it be that IAutoFunctionInvocationFilter does not work in combination with AssistantResponseFormat.CreateJsonSchemaFormat(), or should I approach this differently? If so, how?

@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Feb 25, 2025
@github-actions github-actions bot changed the title Pausing Tool Calls in C# Semantic Kernel to Request User Input .Net: Pausing Tool Calls in C# Semantic Kernel to Request User Input Feb 25, 2025
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
None yet
Development

No branches or pull requests

3 participants