Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agents/json-viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"@inquirer/input": "^4.0.2",
"json-schema-generator": "^2.0.6"
"to-json-schema": "^0.2.5"
}
}
4 changes: 2 additions & 2 deletions agents/json-viewer/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand All @@ -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.

Expand Down