symposium 1.0.2 → 1.0.3
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/Agent.js +2 -8
- package/package.json +1 -1
package/Agent.js
CHANGED
|
@@ -215,16 +215,10 @@ export default class Agent {
|
|
|
215
215
|
if (obj.type !== 'object')
|
|
216
216
|
return {obj, count: 0};
|
|
217
217
|
|
|
218
|
-
let properties_count = 0,
|
|
219
|
-
if (obj.required)
|
|
220
|
-
required = obj.required;
|
|
221
|
-
else
|
|
222
|
-
all_required = true;
|
|
223
|
-
|
|
218
|
+
let properties_count = 0, required = [];
|
|
224
219
|
for (let [key, property] of Object.entries(obj.properties || {})) {
|
|
225
220
|
properties_count++;
|
|
226
|
-
|
|
227
|
-
required.push(key);
|
|
221
|
+
required.push(key); // OpenAI requires all properties to be required
|
|
228
222
|
|
|
229
223
|
if (property.type === 'object') {
|
|
230
224
|
const {obj: subobj, count} = this.convertFunctionToResponseFormat(property);
|