@onyx.dev/onyx-database 2.1.1 → 2.3.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/README.md +26 -0
- package/dist/{aggregates-BFOBBZkW.d.cts → aggregates-BpGa31jk.d.cts} +46 -2
- package/dist/{aggregates-BFOBBZkW.d.ts → aggregates-BpGa31jk.d.ts} +46 -2
- package/dist/edge.cjs +22 -1
- package/dist/edge.cjs.map +1 -1
- package/dist/edge.d.cts +2 -2
- package/dist/edge.d.ts +2 -2
- package/dist/edge.js +22 -1
- package/dist/edge.js.map +1 -1
- package/dist/gen/cli/generate.cjs +21 -0
- package/dist/gen/cli/generate.cjs.map +1 -1
- package/dist/index.cjs +22 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/schema/cli/schema.cjs +21 -0
- package/dist/schema/cli/schema.cjs.map +1 -1
- package/package.json +5 -2
|
@@ -1520,6 +1520,27 @@ var OnyxDatabaseImpl = class {
|
|
|
1520
1520
|
const { http } = await this.ensureAiClient();
|
|
1521
1521
|
return http.request("POST", "/api/script-approvals", input);
|
|
1522
1522
|
}
|
|
1523
|
+
async predict(publishedModelId, inputs) {
|
|
1524
|
+
const { http, databaseId } = await this.ensureClient();
|
|
1525
|
+
const path = `/data/${encodeURIComponent(
|
|
1526
|
+
databaseId
|
|
1527
|
+
)}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict`;
|
|
1528
|
+
return http.request(
|
|
1529
|
+
"POST",
|
|
1530
|
+
path,
|
|
1531
|
+
serializeDates({ inputs })
|
|
1532
|
+
);
|
|
1533
|
+
}
|
|
1534
|
+
async predictFromScript(publishedModelId, scriptId, scriptParameters = {}) {
|
|
1535
|
+
const { http, databaseId } = await this.ensureClient();
|
|
1536
|
+
const path = `/data/${encodeURIComponent(
|
|
1537
|
+
databaseId
|
|
1538
|
+
)}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict/script`;
|
|
1539
|
+
return http.request("POST", path, {
|
|
1540
|
+
scriptId,
|
|
1541
|
+
scriptParameters
|
|
1542
|
+
});
|
|
1543
|
+
}
|
|
1523
1544
|
from(table) {
|
|
1524
1545
|
return new QueryBuilderImpl(this, String(table), this.defaultPartition);
|
|
1525
1546
|
}
|