diff --git a/package.json b/package.json
index c06edf8..aace0e0 100644
--- a/package.json
+++ b/package.json
@@ -9,11 +9,11 @@
"format": "prettier --write '{src/**/*,*}.{js,ts,vue,json}'"
},
"dependencies": {
- "@graphai/vanilla": "^0.0.5",
+ "@graphai/vanilla": "^0.0.6",
"@vueuse/head": "^1.0.16",
"core-js": "^3.25.2",
"firebase": "^10.7.1",
- "graphai": "^0.5.1",
+ "graphai": "^0.5.2",
"litegraph.js": "^0.7.18",
"pinia": "^2.1.7",
"vue": "^3.4.4",
diff --git a/src/views/Home.vue b/src/views/Home.vue
index 5db570f..5e68bf3 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -8,6 +8,7 @@
+
@@ -20,7 +21,9 @@ import "litegraph.js/css/litegraph.css";
import { liteGraph2GraphData } from "../utils/toGraphAi";
import { LiteGraph, setAgentToLiteGraph } from "../utils/setAgentToLiteGraph";
-// import * as vanillaAgents from "@graphai/vanilla";
+import { GraphAI } from "graphai";
+
+import * as vanillaAgents from "@graphai/vanilla";
import { agentlist } from "../utils/agentlist";
import { defaultData } from "../utils/defaultData";
@@ -80,12 +83,20 @@ export default defineComponent({
liteGraph.configure(defaultData);
}
};
+ const runGraph = async () => {
+ const data = liteGraph.serialize();
+ const graphData = liteGraph2GraphData(data, lite2graph as any);
+ const graphAI = new GraphAI(graphData, vanillaAgents);
+ const res = await graphAI.run(true);
+ console.log(res);
+ };
return {
download,
canvasRef,
save,
load,
reset,
+ runGraph,
};
},
});