DefaultSessionTrimmingService
Wisej.AI.Services.DefaultSessionTrimmingService
Last updated
Wisej.AI.Services.DefaultSessionTrimmingService
Last updated
Namespace: Wisej.AI.Services
Assembly: Wisej.AI (3.5.0.0)
Provides functionality to trim messages in a session to reduce the number of tokens.
Initializes a new instance of .
: Gets or sets the percentage of messages to remove (between 0.1 and 0.9). (Default: 0.5
)
: Gets or sets the strategy for handling context overflow. (Default: RollingWindow
)
Trims the messages in the session to reduce the number of tokens.
session
The session to be trimmed.
Message collection to be trimmed. If null, it uses the messages in the session .
Provides functionality to trim messages in a session to reduce the number of tokens.
messages
Returns: .