KernelFunctionFactory Class

Definition

Provides factory methods for creating commonly-used implementations of KernelFunction, such as those backed by a prompt to be submitted to an LLM or those backed by a .NET method.

public static class KernelFunctionFactory
type KernelFunctionFactory = class
Public Class KernelFunctionFactory
Inheritance
KernelFunctionFactory

Methods

CreateFromMethod(Delegate, KernelFunctionFromMethodOptions)

Creates a KernelFunction instance for a method, specified via a delegate.

CreateFromMethod(Delegate, String, String, IEnumerable<KernelParameterMetadata>, KernelReturnParameterMetadata, ILoggerFactory)

Creates a KernelFunction instance for a method, specified via a delegate.

CreateFromMethod(MethodInfo, Object, KernelFunctionFromMethodOptions)

Creates a KernelFunction instance for a method, specified via an MethodInfo instance and an optional target object if the method is an instance method.

CreateFromMethod(MethodInfo, Object, String, String, IEnumerable<KernelParameterMetadata>, KernelReturnParameterMetadata, ILoggerFactory)

Creates a KernelFunction instance for a method, specified via an MethodInfo instance and an optional target object if the method is an instance method.

CreateFromPrompt(IPromptTemplate, PromptTemplateConfig, ILoggerFactory)

Creates a KernelFunction instance for a prompt specified via a prompt template and prompt template configuration.

CreateFromPrompt(PromptTemplateConfig, IPromptTemplateFactory, ILoggerFactory)

Creates a KernelFunction instance for a prompt specified via a prompt template configuration.

CreateFromPrompt(String, IEnumerable<PromptExecutionSettings>, String, String, String, IPromptTemplateFactory, ILoggerFactory)

Creates a KernelFunction instance for a prompt specified via a prompt template.

CreateFromPrompt(String, PromptExecutionSettings, String, String, String, IPromptTemplateFactory, ILoggerFactory)

Creates a KernelFunction instance for a prompt specified via a prompt template.

Applies to