Flowise integration
Flowise prompt compression
Flowise lets you build AI applications visually. SuperCompress integrates as a custom node that compresses context between your retrieval and LLM nodes.
Custom Flowise node
// Custom Function Node in Flowise
const fetch = require("node-fetch");
exports.handler = async (context, query) => {
const resp = await fetch(
"https://supercompress.dev/api/v1/compress",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": process.env.SUPERCOMPRESS_API_KEY,
},
body: JSON.stringify({ context, query }),
}
);
const data = await resp.json();
return data.compressed_text;
};
Frequently asked questions
Where in the Flowise flow should I add compression?
Between the document retrieval node and the LLM chat node. This compresses the retrieved context before generation.
Does it work with Flowise's chat memory?
Yes. Compress the conversation history stored in Flowise's memory node before each LLM call.
Try it yourself
Paste your long prompt into the playground, ask a question, and see what SuperCompress keeps and removes. Free, no signup needed.