@botpress/zai 1.0.1-beta.5 → 1.0.1-beta.8

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.
Files changed (72) hide show
  1. package/dist/{node/adapters → adapters}/botpress-table.js +3 -4
  2. package/dist/index.js +9 -1743
  3. package/dist/{node/operations → operations}/check.js +1 -2
  4. package/dist/{node/operations → operations}/extract.js +1 -2
  5. package/dist/{node/operations → operations}/filter.js +3 -5
  6. package/dist/{node/operations → operations}/label.js +4 -8
  7. package/dist/{node/operations → operations}/rewrite.js +1 -2
  8. package/dist/{node/operations → operations}/summarize.js +1 -2
  9. package/dist/{node/operations → operations}/text.js +1 -2
  10. package/dist/{node/zai.js → zai.js} +2 -3
  11. package/package.json +10 -8
  12. package/dist/browser/index.js +0 -4068
  13. package/dist/node/adapters/adapter.d.js +0 -0
  14. package/dist/node/adapters/botpress-table.d.js +0 -1
  15. package/dist/node/adapters/memory.d.js +0 -0
  16. package/dist/node/index.d.js +0 -9
  17. package/dist/node/index.js +0 -9
  18. package/dist/node/models.d.js +0 -0
  19. package/dist/node/operations/check.d.js +0 -1
  20. package/dist/node/operations/check.test.d.js +0 -1
  21. package/dist/node/operations/constants.d.js +0 -0
  22. package/dist/node/operations/errors.d.js +0 -0
  23. package/dist/node/operations/extract.d.js +0 -1
  24. package/dist/node/operations/extract.test.d.js +0 -1
  25. package/dist/node/operations/filter.d.js +0 -1
  26. package/dist/node/operations/filter.test.d.js +0 -1
  27. package/dist/node/operations/label.d.js +0 -1
  28. package/dist/node/operations/label.test.d.js +0 -1
  29. package/dist/node/operations/rewrite.d.js +0 -1
  30. package/dist/node/operations/rewrite.test.d.js +0 -1
  31. package/dist/node/operations/summarize.d.js +0 -1
  32. package/dist/node/operations/summarize.test.d.js +0 -1
  33. package/dist/node/operations/text.d.js +0 -1
  34. package/dist/node/operations/text.test.d.js +0 -1
  35. package/dist/node/operations/zai-learn.test.d.js +0 -1
  36. package/dist/node/operations/zai-retry.test.d.js +0 -1
  37. package/dist/node/utils.d.js +0 -0
  38. package/dist/node/zai.d.js +0 -1
  39. package/src/adapters/adapter.d.ts +0 -27
  40. package/src/adapters/botpress-table.d.ts +0 -153
  41. package/src/adapters/memory.d.ts +0 -7
  42. package/src/index.d.ts +0 -9
  43. package/src/models.d.ts +0 -351
  44. package/src/operations/__tests/index.d.ts +0 -20
  45. package/src/operations/check.d.ts +0 -36
  46. package/src/operations/check.test.d.ts +0 -1
  47. package/src/operations/constants.d.ts +0 -2
  48. package/src/operations/errors.d.ts +0 -5
  49. package/src/operations/extract.d.ts +0 -20
  50. package/src/operations/extract.test.d.ts +0 -1
  51. package/src/operations/filter.d.ts +0 -39
  52. package/src/operations/filter.test.d.ts +0 -1
  53. package/src/operations/label.d.ts +0 -79
  54. package/src/operations/label.test.d.ts +0 -1
  55. package/src/operations/rewrite.d.ts +0 -34
  56. package/src/operations/rewrite.test.d.ts +0 -1
  57. package/src/operations/summarize.d.ts +0 -46
  58. package/src/operations/summarize.test.d.ts +0 -1
  59. package/src/operations/text.d.ts +0 -16
  60. package/src/operations/text.test.d.ts +0 -1
  61. package/src/operations/zai-learn.test.d.ts +0 -1
  62. package/src/operations/zai-retry.test.d.ts +0 -1
  63. package/src/sdk-interfaces/llm/generateContent.d.ts +0 -128
  64. package/src/sdk-interfaces/llm/listLanguageModels.d.ts +0 -25
  65. package/src/utils.d.ts +0 -52
  66. package/src/zai.d.ts +0 -99
  67. /package/dist/{node/adapters → adapters}/adapter.js +0 -0
  68. /package/dist/{node/adapters → adapters}/memory.js +0 -0
  69. /package/dist/{node/models.js → models.js} +0 -0
  70. /package/dist/{node/operations → operations}/constants.js +0 -0
  71. /package/dist/{node/operations → operations}/errors.js +0 -0
  72. /package/dist/{node/utils.js → utils.js} +0 -0
@@ -112,7 +112,6 @@ export class TableAdapter extends Adapter {
112
112
  });
113
113
  }
114
114
  async assertTableExists() {
115
- var _a, _b, _c;
116
115
  if (this.status !== "ready") {
117
116
  return;
118
117
  }
@@ -142,12 +141,12 @@ export class TableAdapter extends Adapter {
142
141
  issues.push("Table is not frozen");
143
142
  }
144
143
  for (const [key, value] of Object.entries(CRITICAL_TAGS)) {
145
- if (((_a = table.tags) == null ? void 0 : _a[key]) !== value) {
146
- issues.push(`Tag ${key} is ${(_b = table.tags) == null ? void 0 : _b[key]} instead of ${value}`);
144
+ if (table.tags?.[key] !== value) {
145
+ issues.push(`Tag ${key} is ${table.tags?.[key]} instead of ${value}`);
147
146
  }
148
147
  }
149
148
  for (const key of Object.keys(TableJsonSchema)) {
150
- const column = (_c = table.schema) == null ? void 0 : _c.properties[key];
149
+ const column = table.schema?.properties[key];
151
150
  const expected = TableJsonSchema[key];
152
151
  if (!column) {
153
152
  issues.push(`Column ${key} is missing`);