Table of Contents

Interface IMiddleware

Namespace
AutoGen.Core
Assembly
AutoGen.Core.dll

The middleware interface. For streaming-version middleware, check IStreamingMiddleware.

public interface IMiddleware

Properties

Name

the name of the middleware

string? Name { get; }

Property Value

string

Methods

InvokeAsync(MiddlewareContext, IAgent, CancellationToken)

The method to invoke the middleware

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

Parameters

context MiddlewareContext
agent IAgent
cancellationToken CancellationToken

Returns

Task<IMessage>