Skip to content

Add documentation: Explaining the AI Triage Logic in Next.js Template #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

quantstruct-dev-sarthak[bot]
Copy link

AI Triage Logic in Next.js Template

This document explains the AI triage logic implemented within the handleWhatsAppIncoming function of the Next.js template. This logic is responsible for processing incoming WhatsApp messages, determining the user's intent, and selecting the appropriate workflow to respond. Understanding this logic is crucial for customizing the agent's behavior and extending its capabilities with new workflows.

Target Audience: Developers, AI Engineers

Related Endpoint: /api/whatsapp/incoming

AI Logic

The handleWhatsAppIncoming function acts as the entry point for processing incoming WhatsApp messages. It receives the message content and metadata from the /api/whatsapp/incoming endpoint. The core of the AI triage logic involves the following steps:

  1. Message Reception and Preprocessing:
    • The function receives the incoming message data, typically in JSON format.
    • It extracts relevant information such as the sender's pho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants