@runtypelabs/sdk 5.8.0 → 5.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -1
- package/dist/index.d.cts +625 -6
- package/dist/index.d.ts +625 -6
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2283,12 +2283,16 @@ function judge(criteria, opts) {
|
|
|
2283
2283
|
if (typeof criteria !== "string" || criteria.trim().length === 0) {
|
|
2284
2284
|
throw new Error("judge() requires non-empty criteria");
|
|
2285
2285
|
}
|
|
2286
|
+
if (opts?.judgeFlowId !== void 0 && opts.judgeFlowId.trim().length === 0) {
|
|
2287
|
+
throw new Error("judge() requires a non-empty judgeFlowId when one is provided");
|
|
2288
|
+
}
|
|
2286
2289
|
return gradeable({
|
|
2287
2290
|
kind: "ai",
|
|
2288
2291
|
criteria,
|
|
2289
2292
|
...opts?.preset ? { preset: opts.preset } : {},
|
|
2290
2293
|
...opts?.useExpected ? { useExpected: true } : {},
|
|
2291
2294
|
...opts?.model ? { model: opts.model } : {},
|
|
2295
|
+
...opts?.judgeFlowId ? { judgeFlowId: opts.judgeFlowId } : {},
|
|
2292
2296
|
...opts?.threshold !== void 0 ? { threshold: opts.threshold } : {}
|
|
2293
2297
|
});
|
|
2294
2298
|
}
|
|
@@ -6395,7 +6399,7 @@ var Runtype = class {
|
|
|
6395
6399
|
|
|
6396
6400
|
// src/version.ts
|
|
6397
6401
|
var FALLBACK_VERSION = "0.0.0";
|
|
6398
|
-
var SDK_VERSION = "5.
|
|
6402
|
+
var SDK_VERSION = "5.9.0".length > 0 ? "5.9.0" : FALLBACK_VERSION;
|
|
6399
6403
|
var RUNTYPE_CLIENT_KIND = "sdk";
|
|
6400
6404
|
var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
|
|
6401
6405
|
|