Freigeben über


KernelExtensions Class

Definition

Provides extension methods for interacting with Kernel and related types.

public static class KernelExtensions
type KernelExtensions = class
Public Module KernelExtensions
Inheritance
KernelExtensions

Methods

Add(IKernelBuilderPlugins, KernelPlugin)

Adds the plugin to the plugins.

AddFromFunctions(ICollection<KernelPlugin>, String, IEnumerable<KernelFunction>)

Creates a plugin that contains the specified functions and adds it into the plugin collection.

AddFromFunctions(ICollection<KernelPlugin>, String, String, IEnumerable<KernelFunction>)

Creates a plugin that contains the specified functions and adds it into the plugin collection.

AddFromFunctions(IKernelBuilderPlugins, String, IEnumerable<KernelFunction>)

Creates a plugin that wraps the specified target object and adds it into the plugin collection.

AddFromFunctions(IKernelBuilderPlugins, String, String, IEnumerable<KernelFunction>)

Creates a plugin that wraps the specified target object and adds it into the plugin collection.

AddFromObject(ICollection<KernelPlugin>, Object, String, IServiceProvider)

Creates a plugin that wraps the specified target object and adds it into the plugin collection.

AddFromObject(IKernelBuilderPlugins, Object, String)

Creates a plugin that wraps the specified target object and adds it into the plugin collection.

AddFromPromptDirectory(IKernelBuilderPlugins, String, String, IPromptTemplateFactory)

Creates a plugin containing one function per child directory of the specified pluginDirectory and adds it into the plugin collection.

AddFromType<T>(ICollection<KernelPlugin>, String, IServiceProvider)

Creates a plugin that wraps a new instance of the specified type T and adds it into the plugin collection.

AddFromType<T>(IKernelBuilderPlugins, String)

Creates a plugin that wraps a new instance of the specified type T and adds it into the plugin collection.

Build(IKernelBuilder)

Constructs a new instance of Kernel using all of the settings configured on the builder.

CreateFunctionFromMethod(Kernel, Delegate, String, String, IEnumerable<KernelParameterMetadata>, KernelReturnParameterMetadata)

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

CreateFunctionFromMethod(Kernel, MethodInfo, Object, String, String, IEnumerable<KernelParameterMetadata>, KernelReturnParameterMetadata)

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

CreateFunctionFromPrompt(Kernel, PromptTemplateConfig, IPromptTemplateFactory)

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

CreateFunctionFromPrompt(Kernel, String, IEnumerable<PromptExecutionSettings>, String, String, String, IPromptTemplateFactory)

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

CreateFunctionFromPrompt(Kernel, String, PromptExecutionSettings, String, String, String, IPromptTemplateFactory)

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

CreatePluginFromFunctions(Kernel, String, IEnumerable<KernelFunction>)

Creates a plugin that contains the specified functions.

CreatePluginFromFunctions(Kernel, String, String, IEnumerable<KernelFunction>)

Creates a plugin that contains the specified functions.

CreatePluginFromObject(Kernel, Object, String)

Creates a plugin that wraps the specified target object.

CreatePluginFromPromptDirectory(Kernel, String, String, IPromptTemplateFactory)

Creates a plugin containing one function per child directory of the specified pluginDirectory.

CreatePluginFromType<T>(Kernel, String)

Creates a plugin that wraps a new instance of the specified type T.

ImportPluginFromFunctions(Kernel, String, IEnumerable<KernelFunction>)

Creates a plugin that contains the specified functions and imports it into the kernel's plugin collection.

ImportPluginFromFunctions(Kernel, String, String, IEnumerable<KernelFunction>)

Creates a plugin that contains the specified functions and imports it into the kernel's plugin collection.

ImportPluginFromObject(Kernel, Object, String)

Creates a plugin that wraps the specified target object and imports it into the kernel's plugin collection.

ImportPluginFromPromptDirectory(Kernel, String, String, IPromptTemplateFactory)

Creates a plugin containing one function per child directory of the specified pluginDirectory and imports it into the kernel's plugin collection.

ImportPluginFromType<T>(Kernel, String)

Creates a plugin that wraps a new instance of the specified type T and imports it into the kernel's plugin collection.

InvokePromptAsync(Kernel, String, KernelArguments, String, IPromptTemplateFactory, CancellationToken)

Invokes a prompt specified via a prompt template.

InvokePromptAsync<T>(Kernel, String, KernelArguments, String, IPromptTemplateFactory, CancellationToken)

Invokes a prompt specified via a prompt template and returns the results of type T.

InvokePromptAsync<T>(Kernel, String, KernelArguments, String, IPromptTemplateFactory)

Invokes a prompt specified via a prompt template and returns the results of type T.

InvokePromptStreamingAsync(Kernel, String, KernelArguments, String, IPromptTemplateFactory, CancellationToken)

Invokes a prompt specified via a prompt template and streams its results.

InvokePromptStreamingAsync<T>(Kernel, String, KernelArguments, String, IPromptTemplateFactory, CancellationToken)

Invokes a prompt specified via a prompt template and streams its results of type T.

Applies to