joeykot
@joeykot
·
a year ago
·
a year ago
Context Length Filter
Last Updated
a year ago
Created
a year ago
Function
filter
v0.2
Name
Context Length Filter
Downloads
139+
Saves
0+
Description
Filters messages to keep the system prompt and the last N non-system messages, optionally further truncating based on a maximum character count limit.

Context Length Filter

This function controls the context window length.

  1. N Last Messages: Controls the maximum number of messages, defaults to 4 (excluding system prompts).
  2. Max Chars: Controls the maximum number of characters, defaults to -1 (no limit).
    • This limit only applies if the character count of the 'N Last Messages' exceeds the 'Max Chars' value.
  3. Add a dialog box button, clicking it can activate the function (requires enabling the function + enabling global effectiveness)
  4. Automatically filter all images in historical conversations, only keeping the last image for upload to save tokens. If you need to keep all images, you can click the button to deactivate the function.

0