@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.
@@ -1558,6 +1558,27 @@ var OnyxDatabaseImpl = class {
1558
1558
  const { http } = await this.ensureAiClient();
1559
1559
  return http.request("POST", "/api/script-approvals", input);
1560
1560
  }
1561
+ async predict(publishedModelId, inputs) {
1562
+ const { http, databaseId } = await this.ensureClient();
1563
+ const path2 = `/data/${encodeURIComponent(
1564
+ databaseId
1565
+ )}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict`;
1566
+ return http.request(
1567
+ "POST",
1568
+ path2,
1569
+ serializeDates({ inputs })
1570
+ );
1571
+ }
1572
+ async predictFromScript(publishedModelId, scriptId, scriptParameters = {}) {
1573
+ const { http, databaseId } = await this.ensureClient();
1574
+ const path2 = `/data/${encodeURIComponent(
1575
+ databaseId
1576
+ )}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict/script`;
1577
+ return http.request("POST", path2, {
1578
+ scriptId,
1579
+ scriptParameters
1580
+ });
1581
+ }
1561
1582
  from(table) {
1562
1583
  return new QueryBuilderImpl(this, String(table), this.defaultPartition);
1563
1584
  }