compress_context_tool
Filter and compress text context using a local LLMLingua model, guided by a question, to reduce token count before sending to an LLM.
Instructions
Compress text context using LLMLingua with a local model.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"context": "<context>",
"question": "<question>"
},
"name": "compress_context_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | Yes | ||
| question | Yes | ||
| target_tokens | No | ||
| rate | No |