Deskzap - Smart Buffer
AI-generatedSummary
Accumulates each message in a Redis list keyed by session, waits for the configured silence period, then processes the collected messages with the connected AI model. Only the item whose message is still last in the session list produces an output; that output includes the original messages and the AI response.
Inputs
- Session key (required) — Unique session identifier, such as a chat ID or phone number; messages with the same key are accumulated together in Redis.
- Message (required) — Text to add to the session’s message buffer.
- Wait time (seconds) (required) — Silence interval to wait after adding a message. If another message arrives for the same session during this interval, the earlier item produces no output.
- System prompt — Instruction sent to the AI with the accumulated messages. Defaults to a prompt asking the model to summarize them coherently.
- Redis credentials (required) — Connection details for the Redis instance used to store and clear each session’s buffer.
- AI Model connection (required) — Connect an AI language model to process the accumulated text.
Output shape
A list of output items, possibly empty.
When processing runs, each output contains status (
aggregated), sessionKey, messageCount, originalMessages, and aiResponse. The buffer is deleted before AI processing. AI errors are returned as text in aiResponse with the raw accumulated text; item-level errors are logged and omitted.
