CompactionProvider(CompactionStrategy, String, ILoggerFactory) Constructor

Definition

Initializes a new instance of the CompactionProvider class.

public CompactionProvider(Microsoft.Agents.AI.Compaction.CompactionStrategy compactionStrategy, string? stateKey = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.Agents.AI.Compaction.CompactionProvider : Microsoft.Agents.AI.Compaction.CompactionStrategy * string * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Agents.AI.Compaction.CompactionProvider
Public Sub New (compactionStrategy As CompactionStrategy, Optional stateKey As String = Nothing, Optional loggerFactory As ILoggerFactory = Nothing)

Parameters

compactionStrategy
CompactionStrategy

The compaction strategy to apply before each invocation.

stateKey
String

An optional key used to store the provider state in the StateBag. Provide an explicit value if configuring multiple agents with different compaction strategies that will interact in the same session.

loggerFactory
ILoggerFactory

An optional ILoggerFactory used to create a logger for provider diagnostics. When null, logging is disabled.

Exceptions

compactionStrategy is null.

Applies to