aboutsummaryrefslogtreecommitdiffstats
path: root/agents
diff options
context:
space:
mode:
Diffstat (limited to 'agents')
-rw-r--r--agents/json-viewer/package.json2
-rw-r--r--agents/json-viewer/tools.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/agents/json-viewer/package.json b/agents/json-viewer/package.json
index 3a274cf..aa9b2d1 100644
--- a/agents/json-viewer/package.json
+++ b/agents/json-viewer/package.json
@@ -1,6 +1,6 @@
{
"dependencies": {
"@inquirer/input": "^4.0.2",
- "json-schema-generator": "^2.0.6"
+ "to-json-schema": "^0.2.5"
}
}
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.