@rcrsr/rill-ext-openai 0.19.0 → 0.19.1

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 (2) hide show
  1. package/dist/index.js +10 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -222,11 +222,11 @@ function buildPropertyFromStructuralType(rillType) {
222
222
  }
223
223
  if (rillType.kind === "list") {
224
224
  const listType = rillType;
225
- const property = { type: "array" };
225
+ const property2 = { type: "array" };
226
226
  if (listType.element !== void 0) {
227
- property.items = buildPropertyFromStructuralType(listType.element);
227
+ property2.items = buildPropertyFromStructuralType(listType.element);
228
228
  }
229
- return property;
229
+ return property2;
230
230
  }
231
231
  if (rillType.kind === "dict") {
232
232
  const dictType = rillType;
@@ -239,9 +239,14 @@ function buildPropertyFromStructuralType(rillType) {
239
239
  additionalProperties: false
240
240
  };
241
241
  }
242
- return { type: "object" };
242
+ return { type: "object", additionalProperties: false };
243
243
  }
244
- return { type: mapRillType(rillType.kind) };
244
+ const jsonType = mapRillType(rillType.kind);
245
+ const property = { type: jsonType };
246
+ if (jsonType === "object") {
247
+ property.additionalProperties = false;
248
+ }
249
+ return property;
245
250
  }
246
251
  function buildDictSchema(dictType) {
247
252
  const properties = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rcrsr/rill-ext-openai",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "rill extension for OpenAI API integration",
5
5
  "license": "MIT",
6
6
  "author": "Andre Bremer",