Skip to content

Commit

Permalink
Merge pull request #24 from receptron/agents2
Browse files Browse the repository at this point in the history
add agent
  • Loading branch information
isamu authored May 3, 2024
2 parents b9b90ea + 1c3a4e5 commit 2d378ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/utils/graph_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,13 @@ export const graph_data_co2 = {
prompt: "ユーザの問い合わせにある文章の専門家です。専門家として、ユーザのアイデアに対して実現可能なシナリオを100文字で書いてください。",
},
},
isResult: true,
inputs: ["memory"],
},
bypassAgent: {
agentId: "bypassAgent",
inputs: ["slashGPTAgent0.$last.content"],
isResult: true,
},
},
},
},
Expand Down
3 changes: 2 additions & 1 deletion src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { defineComponent, ref, computed } from "vue";
import { GraphAI } from "graphai";
import { pushAgent, popAgent } from "graphai/lib/experimental_agents/array_agents";
import { mapAgent } from "graphai/lib/experimental_agents/graph_agents";
import { bypassAgent } from "graphai/lib/experimental_agents/test_agents";
import { sleepTestAgent, httpAgent, slashGPTFuncitons2TextAgent } from "@/utils/agents";
import { generateGraph } from "@/utils/graph";
Expand Down Expand Up @@ -73,7 +74,7 @@ export default defineComponent({
const logs = ref<unknown[]>([]);
const run = async () => {
const graphai = new GraphAI(selectedGraph.value, { pushAgent, popAgent, sleepTestAgent, httpAgent, slashGPTFuncitons2TextAgent, mapAgent });
const graphai = new GraphAI(selectedGraph.value, { pushAgent, popAgent, sleepTestAgent, httpAgent, slashGPTFuncitons2TextAgent, mapAgent, bypassAgent });
graphai.onLogCallback = async ({ nodeId, state, inputs, result, errorMessage }) => {
logs.value.push({ nodeId, state, inputs, result, errorMessage });
updateCytoscope(nodeId, state);
Expand Down

0 comments on commit 2d378ff

Please sign in to comment.