← Cookbook
Thai customer-support bot on LINE / WhatsApp
Qwen Max for Thai-Chinese-English context, escalation to human via group chat, all running through SeaLink.
Why Qwen for Thai
Qwen3 Max has the strongest multilingual support among Chinese models for Thai, Indonesian, and Vietnamese. For pure English use, Claude Haiku is cheaper.
Architecture
Customer message → LINE / WhatsApp Business webhook → your backend → SeaLink chat completions (qwen3-max) → reply. Escalate keywords (refund / urgent) to a human via Slack.
Backend stub
Node.js example using LINE Messaging API. Replace the LINE adapter with WhatsApp Business if needed; the SeaLink call is identical.
line-bot.ts
import OpenAI from "openai";import { Client } from "@line/bot-sdk";const ai = new OpenAI({baseURL: "https://api.sealink.asia/v1",apiKey: process.env.SEALINK_API_KEY,});const line = new Client({channelAccessToken: process.env.LINE_TOKEN!,channelSecret: process.env.LINE_SECRET!,});const SYSTEM = `You are a friendly customer support agent for a Thaie-commerce store. Reply in the customer's language (Thai, English, orChinese). If the customer mentions "refund", "urgent", or"คืนเงิน" — reply briefly and add the tag [ESCALATE].`;export async function onMessage(event: any) {const userText = event.message.text;const reply = await ai.chat.completions.create({model: "qwen3-max",messages: [{ role: "system", content: SYSTEM },{ role: "user", content: userText },],max_tokens: 250,});const text = reply.choices[0].message.content || "";await line.replyMessage(event.replyToken, {type: "text",text: text.replace("[ESCALATE]", "").trim(),});if (text.includes("[ESCALATE]")) {await escalateToSlack(userText, text);}}
Cost ballpark
10K conversations / month × ~1000 tokens (in + out) on qwen3-max ≈ $40. Add 4% SeaLink markup ≈ $42 / month total.