-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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: Enable CreateFromType/Object to work with closed generics #6218
Conversation
dotnet/src/SemanticKernel.Core/Functions/KernelPluginFactory.cs
Outdated
Show resolved
Hide resolved
Suggest adding an example on how we can retrieve a generic in the I may be trying the open generics here, but would be super nice if we could use that as well, without necessarily specifying the public class MyPlugin
{
[KernelFunction]
public T GenericResult<T>(T input) => input;
[KernelFunction]
public Task<T> GenericResultAsync<T>(T input) => Task.FromResult(input);
} |
This won't work today (even with my change) and is more complicated. |
0cea0ff
to
0d1630a
Compare
#6206 (comment)