@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.mjs
CHANGED
|
@@ -2096,12 +2096,16 @@ function judge(criteria, opts) {
|
|
|
2096
2096
|
if (typeof criteria !== "string" || criteria.trim().length === 0) {
|
|
2097
2097
|
throw new Error("judge() requires non-empty criteria");
|
|
2098
2098
|
}
|
|
2099
|
+
if (opts?.judgeFlowId !== void 0 && opts.judgeFlowId.trim().length === 0) {
|
|
2100
|
+
throw new Error("judge() requires a non-empty judgeFlowId when one is provided");
|
|
2101
|
+
}
|
|
2099
2102
|
return gradeable({
|
|
2100
2103
|
kind: "ai",
|
|
2101
2104
|
criteria,
|
|
2102
2105
|
...opts?.preset ? { preset: opts.preset } : {},
|
|
2103
2106
|
...opts?.useExpected ? { useExpected: true } : {},
|
|
2104
2107
|
...opts?.model ? { model: opts.model } : {},
|
|
2108
|
+
...opts?.judgeFlowId ? { judgeFlowId: opts.judgeFlowId } : {},
|
|
2105
2109
|
...opts?.threshold !== void 0 ? { threshold: opts.threshold } : {}
|
|
2106
2110
|
});
|
|
2107
2111
|
}
|
|
@@ -6208,7 +6212,7 @@ var Runtype = class {
|
|
|
6208
6212
|
|
|
6209
6213
|
// src/version.ts
|
|
6210
6214
|
var FALLBACK_VERSION = "0.0.0";
|
|
6211
|
-
var SDK_VERSION = "5.
|
|
6215
|
+
var SDK_VERSION = "5.9.0".length > 0 ? "5.9.0" : FALLBACK_VERSION;
|
|
6212
6216
|
var RUNTYPE_CLIENT_KIND = "sdk";
|
|
6213
6217
|
var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
|
|
6214
6218
|
|
package/package.json
CHANGED