CompactionProvider(CompactionStrategy, String, ILoggerFactory) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.