@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.
- package/dist/index.js +10 -5
- 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
|
|
225
|
+
const property2 = { type: "array" };
|
|
226
226
|
if (listType.element !== void 0) {
|
|
227
|
-
|
|
227
|
+
property2.items = buildPropertyFromStructuralType(listType.element);
|
|
228
228
|
}
|
|
229
|
-
return
|
|
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
|
-
|
|
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 = {};
|