diff options
Diffstat (limited to 'agents/json-viewer/tools.js')
| -rw-r--r-- | agents/json-viewer/tools.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/agents/json-viewer/tools.js b/agents/json-viewer/tools.js index ea673b9..eba8c93 100644 --- a/agents/json-viewer/tools.js +++ b/agents/json-viewer/tools.js @@ -4,7 +4,7 @@ const { promisify } = require("node:util"); const path = require("node:path"); const { tmpdir } = require("node:os"); -const jsonSchemaGenerator = require("json-schema-generator"); +const toJsonSchema = require('to-json-schema'); const input = require("@inquirer/input").default; exports._instructions = async function () { @@ -23,7 +23,7 @@ exports._instructions = async function () { } const json_data = await fs.readFile(json_file_path, "utf8"); - const json_schema = jsonSchemaGenerator(JSON.parse(json_data)); + const json_schema = toJsonSchema(JSON.parse(json_data)); return `You are a AI agent that can view and filter json data with jq. |
