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.

406 B
Raw Blame
import sdk = require('laya-client');
const client = new sdk.Laya();
const questions = sdk.defineQuestions({ q: { type: 'noul', instructions: 'Does it work?' } });
async function run() {
  const result = await client.predict('Yes', questions);
  const probability: number = result.answers.q.noul;
  // @ts-expect-error Noul answers have no score.
  result.answers.q.score;
  return probability;
}
void run;