-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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: New Feature: Ingerating .Net authorization with tool calling #10045
Comments
@SergeyMenshykh What are doing at the moment for authorization? Is this relevant to non-asp.net applications? |
Authentication and authorization of tools/functions have been outside the scope of SK, except for OpenAPI functions, where SK can accept a custom HTTP handler to enable authentication scenarios. There have been conversations about filters for function advertisements that would allow customization of the process for providing/sending functions to AI models, but we are not there yet. Meanwhile, you can consider a few options:
Option 1 will require re-creating the kernel and importing plugins every time the user authentication/authorization status changes, while with Option 2, it's not necessary since the functions are not imported to the kernel. |
Code Example
public class TimeTool
{
[KernelFunction, Description("Provides the current date and time.")]
[Authorize] // only sends this tool when the user is authenticated
public static string GetTime() => DateTime.UtcNow.ToString("R", CultureInfo.InvariantCulture);
}
and so on.
The text was updated successfully, but these errors were encountered: