← All examples
10 / 100
Jev Multilingual queue Code Example
Route mixed-language messages without guessing from locale.
Hola, necesito ayuda con mi factura.
Message Hola, necesito ayuda con mi factura.
Account Locale en-US
Which language queue fits this message?
0%
Spanish.
Let the application spanish.
Code
// Conceptual pseudocode — not Jev SDK syntax
const state = {
"message": "Hola, necesito ayuda con mi factura.",
"account_locale": "en-US"
};
const decision = await evaluateDecision({
state,
question: "Which language queue fits this message?",
options: ["Spanish","English","Language review"],
});
// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Spanish"
&& decision.probability >= 0.85) {
routeLanguage(decision);
} else {
queueForReview(decision);
} This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.