Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

478 B
Raw Blame
import { Laya, triageQuestions } from 'laya-client';

const laya = new Laya({
  baseURL: process.env.LAYA_BASE_URL ?? 'http://127.0.0.1:8000',
  apiKey: process.env.LAYA_API_KEY,
  timeoutMs: 600_000,
});

try {
  const result = await laya.predict(
    { message: 'I was billed twice for March. Please refund the duplicate today.' },
    triageQuestions(),
  );
  console.log(JSON.stringify(result, null, 2));
} catch (error) {
  console.error(error);
  process.exitCode = 1;
}