diff options
| author | sigoden <sigoden@gmail.com> | 2024-06-08 16:46:16 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-08 16:46:16 +0800 |
| commit | 0ac5193b8dccb69a9468028bf30522ff05b38f89 (patch) | |
| tree | 55ad65863051ddc407b5708c16ed4ea4114e0e66 /scripts/build-declarations.js | |
| parent | 8a87890df6e2b5356d4877a311dd8937a92d11a1 (diff) | |
| download | llm-functions-docker-0ac5193b8dccb69a9468028bf30522ff05b38f89.tar.gz | |
fix: js/py build-declarations scripts (#36)
Diffstat (limited to 'scripts/build-declarations.js')
| -rw-r--r-- | scripts/build-declarations.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/build-declarations.js b/scripts/build-declarations.js index 86908fa..37b840e 100644 --- a/scripts/build-declarations.js +++ b/scripts/build-declarations.js @@ -180,11 +180,15 @@ function buildProperty(type, description) { * @param {Param[]} params */ function buildDeclaration(name, description, params) { - const schema = { + const declaration = { name, description, - properties: {}, + parameters: { + type: "object", + properties: {}, + }, }; + const schema = declaration.parameters; const requiredParams = []; for (const { name, property, required } of params) { schema.properties[name] = property; @@ -195,7 +199,7 @@ function buildDeclaration(name, description, params) { if (requiredParams.length > 0) { schema.required = requiredParams; } - return schema; + return declaration; } /** |
