TextMessageCompressor
It uses a specified text compression method to reduce the token count of messages, which can lead to more efficient processing and response generation by downstream models.
Parameters:
Instance Methods
apply_transform
The function processes each message according to the
compression_args and min_tokens settings, applying
the specified compression configuration and returning a new list of messages with reduced token counts
where possible.Parameters:
Returns: