@receptron/graphai_cli 2.0.0 → 2.0.2
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/lib/graphai_cli.js +11 -1
- package/package.json +5 -5
package/lib/graphai_cli.js
CHANGED
|
@@ -42,6 +42,7 @@ const graphai_1 = require("graphai");
|
|
|
42
42
|
const packages = __importStar(require("@graphai/agents"));
|
|
43
43
|
const token_bound_string_agent_1 = require("@graphai/token_bound_string_agent");
|
|
44
44
|
const vanilla_node_agents_1 = require("@graphai/vanilla_node_agents");
|
|
45
|
+
const stream_agent_filter_1 = require("@graphai/stream_agent_filter");
|
|
45
46
|
const fs_1 = __importDefault(require("fs"));
|
|
46
47
|
const path_1 = __importDefault(require("path"));
|
|
47
48
|
const yaml_1 = __importDefault(require("yaml"));
|
|
@@ -87,7 +88,16 @@ const main = async () => {
|
|
|
87
88
|
console.log(yaml_1.default.stringify(graph_data, null, 2));
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
|
-
const
|
|
91
|
+
const consoleStreamAgentFilter = (0, stream_agent_filter_1.streamAgentFilterGenerator)((context, data) => {
|
|
92
|
+
process.stdout.write(data);
|
|
93
|
+
});
|
|
94
|
+
const agentFilters = [
|
|
95
|
+
{
|
|
96
|
+
name: "consoleStreamAgentFilter",
|
|
97
|
+
agent: consoleStreamAgentFilter
|
|
98
|
+
},
|
|
99
|
+
];
|
|
100
|
+
const graph = new graphai_1.GraphAI(graph_data, agents, { agentFilters });
|
|
91
101
|
if (args_1.args.verbose) {
|
|
92
102
|
graph.onLogCallback = test_utils_1.callbackLog;
|
|
93
103
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@receptron/graphai_cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "GraphAI command line tools.",
|
|
5
5
|
"main": "lib/graphai_cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"@types/yargs": "^17.0.33"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@graphai/
|
|
38
|
-
"@graphai/
|
|
37
|
+
"@graphai/agents": "^2.0.4",
|
|
38
|
+
"@graphai/stream_agent_filter": "^2.0.1",
|
|
39
39
|
"@graphai/token_bound_string_agent": "^1.0.1",
|
|
40
|
-
"@graphai/vanilla_node_agents": "^
|
|
40
|
+
"@graphai/vanilla_node_agents": "^2.0.0",
|
|
41
41
|
"@receptron/test_utils": "^2.0.0",
|
|
42
42
|
"dotenv": "^16.5.0",
|
|
43
|
-
"graphai": "^
|
|
43
|
+
"graphai": "^2.0.5",
|
|
44
44
|
"yargs": "^17.7.2"
|
|
45
45
|
},
|
|
46
46
|
"types": "./lib/graphai_cli.d.ts",
|