PurviewExtensions.PurviewAgentMiddleware Method

Definition

Creates a Purview middleware function for use with an AIAgent.

public static Func<Microsoft.Agents.AI.AIAgent,Microsoft.Agents.AI.AIAgent> PurviewAgentMiddleware(Azure.Core.TokenCredential tokenCredential, Microsoft.Agents.AI.Purview.PurviewSettings purviewSettings, Microsoft.Extensions.Logging.ILogger? logger = default, Microsoft.Extensions.Caching.Distributed.IDistributedCache? cache = default);
static member PurviewAgentMiddleware : Azure.Core.TokenCredential * Microsoft.Agents.AI.Purview.PurviewSettings * Microsoft.Extensions.Logging.ILogger * Microsoft.Extensions.Caching.Distributed.IDistributedCache -> Func<Microsoft.Agents.AI.AIAgent, Microsoft.Agents.AI.AIAgent>
Public Function PurviewAgentMiddleware (tokenCredential As TokenCredential, purviewSettings As PurviewSettings, Optional logger As ILogger = Nothing, Optional cache As IDistributedCache = Nothing) As Func(Of AIAgent, AIAgent)

Parameters

tokenCredential
TokenCredential

The token credential used to authenticate with Purview.

purviewSettings
PurviewSettings

The settings for communication with Purview.

logger
ILogger

The logger to use for logging.

cache
IDistributedCache

The distributed cache to use for caching Purview responses. An in memory cache will be used if this is null.

Returns

An agent middleware delegate.

Applies to