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: The original execution settings are not available in IAutoFunctionInvocationFilter #10475

Open
markwallace-microsoft opened this issue Feb 10, 2025 · 0 comments · May be fixed by #10551
Open
Assignees
Labels
.NET Issue or Pull requests regarding .NET code

Comments

@markwallace-microsoft
Copy link
Member

Say I call a chat completion as follows:

 OpenAIPromptExecutionSettings settings = new()
 {
     ServiceId = "swedencentral",
     FunctionChoiceBehavior = FunctionChoiceBehavior.Auto()
 };
 kernel.Data.Add("service_id", "swedencentral");
 var reply = await kernel.InvokePromptAsync("Some question?", new(settings));

If I register an IAutoFunctionInvocationFilter I cannot get access to the prompt execution settings to get the service id.

The workaround is to use kernel.Data but this is not ideal.

The problem is in the FunctionCallProcessor as it does not pass on the original execution settings.

@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Feb 10, 2025
@markwallace-microsoft markwallace-microsoft moved this to Backlog: Planned in Semantic Kernel Feb 10, 2025
@github-actions github-actions bot changed the title The original execution settings are not available in IAutoFunctionInvocationFilter .Net: The original execution settings are not available in IAutoFunctionInvocationFilter Feb 10, 2025
@SergeyMenshykh SergeyMenshykh moved this from Backlog: Planned to Sprint: Planned in Semantic Kernel Feb 11, 2025
@SergeyMenshykh SergeyMenshykh moved this from Sprint: Planned to Sprint: In Progress in Semantic Kernel Feb 14, 2025
@SergeyMenshykh SergeyMenshykh moved this from Sprint: In Progress to Sprint: In Review in Semantic Kernel Feb 14, 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
Status: Sprint: In Review
Development

Successfully merging a pull request may close this issue.

2 participants