KernelFunction.AsAIFunction(Kernel) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an AIFunction for this KernelFunction.
public Microsoft.Extensions.AI.AIFunction AsAIFunction(Microsoft.SemanticKernel.Kernel? kernel = default);
member this.AsAIFunction : Microsoft.SemanticKernel.Kernel -> Microsoft.Extensions.AI.AIFunction
Public Function AsAIFunction (Optional kernel As Kernel = Nothing) As AIFunction
Parameters
- kernel
- Kernel
The Kernel instance to pass to the KernelFunction when it's invoked as part of the AIFunction's invocation.
Returns
An instance of AIFunction that, when invoked, will in turn invoke the current KernelFunction.