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.

Update laya-ts/src/structured.ts

Ang Zhangc9e6a4aefb8c
diff --git a/laya-ts/src/structured.ts b/laya-ts/src/structured.ts
index f34769fb..f1b2f2fe 100644
--- a/laya-ts/src/structured.ts
+++ b/laya-ts/src/structured.ts
@@ -429,6 +429,7 @@ export async function decideBatch(
questions,
returnDetails = false,
minConfidence,
+ min_confidence,
...predictOpts
} = opts;
if ((schema == null) === (questions == null)) {
@@ -438,7 +439,8 @@ export async function decideBatch(
throw new TypeError(`states must be an array of states, not ${pyType(states)}`);
}
- const mc = minConfidence !== undefined && minConfidence !== null ? checkMinConfidence(minConfidence) : null;
+ const mcOpt = minConfidence ?? min_confidence;
+ const mc = mcOpt !== undefined && mcOpt !== null ? checkMinConfidence(mcOpt) : null;
let fields: PlannedField[] | null = null;
let qs = questions;