v148 · AI · JavaScript

Local Triage Workflow

A realistic multilingual support triage flow: submit a message in any language, the on-device Language Detector identifies it, and the ticket is routed to the matching regional team. Zero text leaves the browser.

On-device · No network · No API key
New support ticket
or try a sample: Ready to route locally.
Inbox 4 tickets
Routing table
// Triage pattern: detect → route const ROUTES = { fr: 'France/Belgium team', de: 'DACH team', es: 'Latin America/Spain team', ja: 'Japan team', ar: 'MENA team', pt: 'Brazil/Portugal team', zh: 'China team', ko: 'Korea team', }; async function triageTicket(text) { const detector = await LanguageDetector.create({ expectedInputLanguages: Object.keys(ROUTES) }); const [top] = await detector.detect(text); const lang = top.detectedLanguage; const team = ROUTES[lang] ?? 'General support'; return { lang, confidence: top.confidence, team }; }

see also

references

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗