Table of Contents

Class KernelPluginMiddleware

Namespace
AutoGen.SemanticKernel
Assembly
AutoGen.SemanticKernel.dll

A middleware that consumes Microsoft.SemanticKernel.KernelPlugin

public class KernelPluginMiddleware : IMiddleware
Inheritance
KernelPluginMiddleware
Implements
Inherited Members

Constructors

KernelPluginMiddleware(Kernel, KernelPlugin)

public KernelPluginMiddleware(Kernel kernel, KernelPlugin kernelPlugin)

Parameters

kernel Kernel
kernelPlugin KernelPlugin

Properties

Name

the name of the middleware

public string? Name { get; }

Property Value

string

Methods

InvokeAsync(MiddlewareContext, IAgent, CancellationToken)

The method to invoke the middleware

public Task<IMessage> InvokeAsync(MiddlewareContext context, IAgent agent, CancellationToken cancellationToken = default)

Parameters

context MiddlewareContext
agent IAgent
cancellationToken CancellationToken

Returns

Task<IMessage>