Перейти к содержанию
НОВОЕМаркетплейс и trig8n Agent: продавайте то, что создали, и получайте планы и изменения, проверенные до того, как вы их увидите. Что нового

Библиотека / Чат-боты и боты для мессенджеров

Чат-боты и боты для мессенджеров

Буферизация сообщений Telegram для ИИ-агента с Supabase

При получении сообщения в Telegram ставит его в очередь в Supabase, ждёт десять секунд новых сообщений, затем отправляет объединённые сообщения агенту OpenAI для одного ответа.

Что делает

## Allow Users to Send a Sequence of Messages to an AI Agent in Telegram with Supabase ### Use Case When creating chatbots that interface through applications such as Telegram and WhatsApp, users can often sends multiple shorter messages in quick succession, in place of a single, longer message. This workflow accounts for this behaviour. ### What it Does This workflow allows users to send several messages in quick succession, treating them as one coherent conversation instead of separate messages requiring individual responses. ### How it Works 1. When messages arrive, they are stored in a Supabase PostgreSQL table 2. The system waits briefly to see if additional messages arrive 3. If no new messages arrive within the waiting period, all queued messages are: - Combined and processed as a single conversation - Responded to with one unified reply - Deleted from the queue

Шаги

  1. Reply
  2. Receive Message
  3. Wait 10 Seconds
  4. Add to Queued Messages
  5. No Operation, do nothing
  6. Aggregate
  7. Delete Queued Messages
  8. OpenAI Chat Model
  9. Sort by Message ID
  10. Get Queued Messages
  11. Check Most Recent Message
  12. AI Agent
  13. Postgres Chat Memory
  14. Error Handler for ce90f954

Всего шагов: 17.

Похожие автоматизации