Skip to content

Commit

Permalink
fork in 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
snakajima committed May 9, 2024
1 parent 0e6fcce commit ce3ffdd
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions tests/graphai/test_fork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,35 @@ const testAgent1a: AgentFunction = async ({ debugInfo: { nodeId }, inputs }) =>

test("test fork 1", async () => {
const forkGraph = {
version: 0.2,
version: 0.3,
nodes: {
node1: {
agent: "testAgent1a",
},
node2: {
agent: "copy2ArrayAgent",
params: { count: 10 },
inputs: ["node1"],
inputs: [":node1"],
},
mapNode: {
agent: "mapAgent",
inputs: ["node2"],
inputs: [":node2"],
params: {
injectionTo: ["buffer"],
},
graph: {
version: 0.2,
version: 0.3,
nodes: {
buffer: {
value: {},
},
node2: {
agent: "testAgent1a",
inputs: ["buffer"],
inputs: [":buffer"],
},
node3: {
agent: "testAgent1a",
inputs: ["node2"],
inputs: [":node2"],
isResult: true,
},
},
Expand Down Expand Up @@ -107,7 +107,7 @@ test("test fork 1", async () => {

test("test fork 2", async () => {
const forkGraph = {
version: 0.2,
version: 0.3,
nodes: {
echo: {
agent: "copyMessageAgent",
Expand All @@ -118,9 +118,9 @@ test("test fork 2", async () => {
},
mapNode: {
agent: "mapAgent",
inputs: ["echo.messages"],
inputs: [":echo.messages"],
graph: {
version: 0.2,
version: 0.3,
nodes: {
node1: {
agent: "testAgent1",
Expand All @@ -129,12 +129,12 @@ test("test fork 2", async () => {
node2: {
agent: "testAgent1",
params: {},
inputs: ["node1"],
inputs: [":node1"],
},
node3: {
agent: "testAgent1",
params: {},
inputs: ["node2"],
inputs: [":node2"],
isResult: true,
},
},
Expand Down Expand Up @@ -168,38 +168,38 @@ test("test fork 2", async () => {

test("test fork 3", async () => {
const forkGraph = {
version: 0.2,
version: 0.3,
nodes: {
source: {
value: { content: [{ level1: { level2: "hello1" } }, { level1: { level2: "hello2" } }] },
},
mapNode: {
agent: "mapAgent",
inputs: ["source.content"],
inputs: [":source.content"],
params: {
injectionTo: ["workingMemory"],
},
graph: {
version: 0.2,
version: 0.3,
nodes: {
workingMemory: {
value: {},
},
forked: {
agent: "sleeperAgent",
inputs: ["workingMemory.level1"],
inputs: [":workingMemory.level1"],
},
forked2: {
agent: "sleeperAgent",
inputs: ["forked"],
inputs: [":forked"],
isResult: true,
},
},
},
},
bypassAgent: {
agent: "bypassAgent",
inputs: ["mapNode"],
inputs: [":mapNode"],
},
},
};
Expand Down

0 comments on commit ce3ffdd

Please sign in to comment.