From 0829f835b09791077c886b9a417eeae6fff07498 Mon Sep 17 00:00:00 2001 From: isamu Date: Fri, 17 Jan 2025 07:54:11 +0900 Subject: [PATCH 1/7] add NestedAgentGeneratorOption --- .../src/graph_agents/nested_agent.ts | 12 +++++++- .../tests/agents/test_nest_agent.ts | 29 ++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/agents/vanilla_agents/src/graph_agents/nested_agent.ts b/agents/vanilla_agents/src/graph_agents/nested_agent.ts index 7ee6a931..0f21c709 100644 --- a/agents/vanilla_agents/src/graph_agents/nested_agent.ts +++ b/agents/vanilla_agents/src/graph_agents/nested_agent.ts @@ -1,7 +1,13 @@ import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, StaticNodeData, GraphData } from "graphai"; import { GraphAI, assert, graphDataLatestVersion } from "graphai"; -export const nestedAgentGenerator: (graphData: GraphData) => (context: AgentFunctionContext) => Promise = (graphData: GraphData) => { +type NestedAgentGeneratorOption = { + resultNodeId: string; +}; +export const nestedAgentGenerator: (graphData: GraphData, options?: NestedAgentGeneratorOption) => (context: AgentFunctionContext) => Promise = ( + graphData: GraphData, + options?: NestedAgentGeneratorOption, +) => { return async (context: AgentFunctionContext) => { const { namedInputs, log, debugInfo, params, forNestedGraph } = context; assert(!!forNestedGraph, "Please update graphai to 0.5.19 or higher"); @@ -43,6 +49,10 @@ export const nestedAgentGenerator: (graphData: GraphData) => (context: AgentFunc const results = await graphAI.run(false); log?.push(...graphAI.transactionLogs()); + + if (options && options.resultNodeId) { + return results[options.resultNodeId]; + } return results; } catch (error) { if (error instanceof Error && !throwError) { diff --git a/agents/vanilla_agents/tests/agents/test_nest_agent.ts b/agents/vanilla_agents/tests/agents/test_nest_agent.ts index e2100dc9..b3190b0b 100644 --- a/agents/vanilla_agents/tests/agents/test_nest_agent.ts +++ b/agents/vanilla_agents/tests/agents/test_nest_agent.ts @@ -1,4 +1,4 @@ -import { nestedAgent } from "@/index"; +import { nestedAgent, copyAgent } from "@/index"; import { nestedAgentGenerator } from "@/generator"; import { sleepAndMergeAgent } from "@graphai/sleeper_agents"; @@ -57,3 +57,30 @@ test("test nest agent generator", async () => { node1: { apple: "red", lemon: "yellow", orange: "orange" }, }); }); + +test("test nest agent generator", async () => { + const graphData = { + version: graphDataLatestVersion, + nodes: { + node1: { + agent: "copyAgent", + inputs: { text: ["hello"] }, + isResult: true, + }, + }, + }; + const testAgent = nestedAgentGenerator(graphData, { resultNodeId: "node1" }); + const testAgentInfo = agentInfoWrapper(testAgent); + testAgentInfo.hasGraphData = true; + const result = await testAgent({ + ...defaultTestContext, + forNestedGraph: { + agents: { copyAgent, testAgent: testAgentInfo }, + graphOptions: {}, + }, + namedInputs: {}, + }); + assert.deepStrictEqual(result, { + text: ["hello"], + }); +}); From 1903fcdc6680081befb11f14ae40b98a0e1f98d5 Mon Sep 17 00:00:00 2001 From: isamu Date: Fri, 17 Jan 2025 07:54:31 +0900 Subject: [PATCH 2/7] update graphai --- packages/cli/package.json | 2 +- packages/test_utils/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 7e1f9bc0..d5ce92dd 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -38,7 +38,7 @@ "@graphai/agents": "^0.2.5", "@receptron/test_utils": "^0.2.2", "dotenv": "^16.4.7", - "graphai": "^0.6.17", + "graphai": "^0.6.19", "yargs": "^17.7.2" }, "types": "./lib/graphai_cli.d.ts", diff --git a/packages/test_utils/package.json b/packages/test_utils/package.json index 53824d28..4ca83c71 100644 --- a/packages/test_utils/package.json +++ b/packages/test_utils/package.json @@ -30,7 +30,7 @@ "devDependencies": { "@graphai/agent_filters": "^0.0.9", "@graphai/vanilla": "^0.2.6", - "graphai": "^0.6.17" + "graphai": "^0.6.19" }, "types": "./lib/index.d.ts", "directories": { From 1dec74fc1685ff25efdb348a74462cc53c90d0f7 Mon Sep 17 00:00:00 2001 From: isamu Date: Fri, 17 Jan 2025 08:05:39 +0900 Subject: [PATCH 3/7] add update_text_agent --- .../vanilla_agents/src/string_agents/index.ts | 3 +- .../src/string_agents/update_text_agent.ts | 66 +++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 agents/vanilla_agents/src/string_agents/update_text_agent.ts diff --git a/agents/vanilla_agents/src/string_agents/index.ts b/agents/vanilla_agents/src/string_agents/index.ts index 516fd3c4..c416dc11 100644 --- a/agents/vanilla_agents/src/string_agents/index.ts +++ b/agents/vanilla_agents/src/string_agents/index.ts @@ -3,5 +3,6 @@ import stringTemplateAgent from "./string_template_agent"; import jsonParserAgent from "./json_parser_agent"; import stringCaseVariantsAgent from "./string_case_variants_agent"; +import updateTextAgent from "./update_text_agent"; -export { stringSplitterAgent, stringTemplateAgent, jsonParserAgent, stringCaseVariantsAgent }; +export { stringSplitterAgent, stringTemplateAgent, jsonParserAgent, stringCaseVariantsAgent, updateTextAgent }; diff --git a/agents/vanilla_agents/src/string_agents/update_text_agent.ts b/agents/vanilla_agents/src/string_agents/update_text_agent.ts new file mode 100644 index 00000000..924d88bf --- /dev/null +++ b/agents/vanilla_agents/src/string_agents/update_text_agent.ts @@ -0,0 +1,66 @@ +import { nestedAgentGenerator } from "@/generator"; +import { graphDataLatestVersion } from "graphai"; + +const updateTextGraph = { + version: graphDataLatestVersion, + nodes: { + isNewText: { + if: ":newText", + agent: "copyAgent", + inputs: { + text: ":newText", + }, + }, + isOldText: { + unless: ":newText", + agent: "copyAgent", + inputs: { + text: ":oldText", + }, + }, + updatedText: { + agent: "copyAgent", + anyInput: true, + inputs: { + text: [":isNewText.text", ":isOldText.text"], + }, + }, + resultText: { + isResult: true, + agent: "copyAgent", + anyInput: true, + inputs: { + text: ":updatedText.text.$0", + }, + }, + }, +}; + +const updateTextAgent = nestedAgentGenerator(updateTextGraph, { resultNodeId: "resultText" }); + +const updateTextAgentInfo = { + name: "updateTextAgent", + agent: updateTextAgent, + mock: updateTextAgent, + samples: [ + { + inputs: { newText: "new", oldText: "old" }, + params: {}, + result: { text: "new" }, + }, + { + inputs: { newText: "", oldText: "old" }, + params: {}, + result: { text: "old" }, + }, + ], + description: "", + category: [], + author: "", + repository: "", + tools: [], + license: "", + hasGraphData: true, +}; + +export default updateTextAgentInfo; From 7d117e667f407722343c455adc611d21f1100eae Mon Sep 17 00:00:00 2001 From: isamu Date: Fri, 17 Jan 2025 08:06:00 +0900 Subject: [PATCH 4/7] agent runner support hasGraphData --- packages/test_utils/src/agent_test_runner.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/test_utils/src/agent_test_runner.ts b/packages/test_utils/src/agent_test_runner.ts index d82a6c7a..a7382b9a 100644 --- a/packages/test_utils/src/agent_test_runner.ts +++ b/packages/test_utils/src/agent_test_runner.ts @@ -7,7 +7,7 @@ import assert from "node:assert"; // for agent export const agentTestRunner = async (agentInfo: AgentFunctionInfo) => { - const { agent, samples, inputs: inputSchema } = agentInfo; + const { agent, samples, inputs: inputSchema, hasGraphData } = agentInfo; if (samples.length === 0) { console.log(`test ${agentInfo.name}: No test`); } else { @@ -23,7 +23,7 @@ export const agentTestRunner = async (agentInfo: AgentFunctionInfo) => { // inputs: flatInputs, inputSchema, namedInputs: inputs, - forNestedGraph: graph + forNestedGraph: graph ?? hasGraphData ? { graphData: graph, agents, From 5024895183a89c2a9160d6eec63f5d7066b36a98 Mon Sep 17 00:00:00 2001 From: isamu Date: Fri, 17 Jan 2025 08:07:38 +0900 Subject: [PATCH 5/7] @graphai/vanilla@0.2.8 --- agents/vanilla_agents/lib/bundle.cjs.js | 246 ++++++++++------- agents/vanilla_agents/lib/bundle.cjs.js.map | 2 +- agents/vanilla_agents/lib/bundle.cjs.min.js | 2 +- .../vanilla_agents/lib/bundle.cjs.min.js.map | 2 +- agents/vanilla_agents/lib/bundle.esm.js | 249 +++++++++++------- agents/vanilla_agents/lib/bundle.esm.js.map | 2 +- agents/vanilla_agents/lib/bundle.esm.min.js | 2 +- .../vanilla_agents/lib/bundle.esm.min.js.map | 2 +- agents/vanilla_agents/lib/bundle.umd.js | 246 ++++++++++------- agents/vanilla_agents/lib/bundle.umd.js.map | 2 +- .../lib/graph_agents/nested_agent.d.ts | 5 +- .../lib/graph_agents/nested_agent.js | 5 +- .../lib/string_agents/index.d.ts | 3 +- .../vanilla_agents/lib/string_agents/index.js | 4 +- agents/vanilla_agents/package.json | 2 +- 15 files changed, 487 insertions(+), 287 deletions(-) diff --git a/agents/vanilla_agents/lib/bundle.cjs.js b/agents/vanilla_agents/lib/bundle.cjs.js index 8f9ee812..5e8f5245 100644 --- a/agents/vanilla_agents/lib/bundle.cjs.js +++ b/agents/vanilla_agents/lib/bundle.cjs.js @@ -311,6 +311,160 @@ const stringCaseVariantsAgentInfo = { license: "MIT", }; +const nestedAgentGenerator = (graphData, options) => { + return async (context) => { + const { namedInputs, log, debugInfo, params, forNestedGraph } = context; + graphai.assert(!!forNestedGraph, "Please update graphai to 0.5.19 or higher"); + const { agents, graphOptions, onLogCallback } = forNestedGraph; + const { taskManager } = graphOptions; + const throwError = params.throwError ?? false; + if (taskManager) { + const status = taskManager.getStatus(false); + graphai.assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`); + } + graphai.assert(!!graphData, "nestedAgent: graph is required"); + const { nodes } = graphData; + const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphai.graphDataLatestVersion }; // deep enough copy + const nodeIds = Object.keys(namedInputs); + if (nodeIds.length > 0) { + nodeIds.forEach((nodeId) => { + if (nestedGraphData.nodes[nodeId] === undefined) { + // If the input node does not exist, automatically create a static node + nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] }; + } + else { + // Otherwise, inject the proper data here (instead of calling injectTo method later) + nestedGraphData.nodes[nodeId]["value"] = namedInputs[nodeId]; + } + }); + } + try { + if (nestedGraphData.version === undefined && debugInfo.version) { + nestedGraphData.version = debugInfo.version; + } + const graphAI = new graphai.GraphAI(nestedGraphData, agents || {}, graphOptions); + // for backward compatibility. Remove 'if' later + if (onLogCallback) { + graphAI.onLogCallback = onLogCallback; + } + const results = await graphAI.run(false); + log?.push(...graphAI.transactionLogs()); + if (options && options.resultNodeId) { + return results[options.resultNodeId]; + } + return results; + } + catch (error) { + if (error instanceof Error && !throwError) { + return { + onError: { + message: error.message, + error, + }, + }; + } + throw error; + } + }; +}; +const nestedAgent = async (context) => { + const { forNestedGraph } = context; + const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } }; + graphai.assert(!!graphData, "No GraphData"); + return await nestedAgentGenerator(graphData)(context); +}; +const nestedAgentInfo = { + name: "nestedAgent", + agent: nestedAgent, + mock: nestedAgent, + samples: [ + { + inputs: { + message: "hello", + }, + params: {}, + result: { + test: ["hello"], + }, + graph: { + nodes: { + test: { + agent: "copyAgent", + params: { namedKey: "messages" }, + inputs: { messages: [":message"] }, + isResult: true, + }, + }, + }, + }, + ], + description: "nested Agent", + category: ["graph"], + author: "Receptron team", + repository: "https://github.com/receptron/graphai", + license: "MIT", +}; + +const updateTextGraph = { + version: graphai.graphDataLatestVersion, + nodes: { + isNewText: { + if: ":newText", + agent: "copyAgent", + inputs: { + text: ":newText", + }, + }, + isOldText: { + unless: ":newText", + agent: "copyAgent", + inputs: { + text: ":oldText", + }, + }, + updatedText: { + agent: "copyAgent", + anyInput: true, + inputs: { + text: [":isNewText.text", ":isOldText.text"], + }, + }, + resultText: { + isResult: true, + agent: "copyAgent", + anyInput: true, + inputs: { + text: ":updatedText.text.$0", + }, + }, + }, +}; +const updateTextAgent = nestedAgentGenerator(updateTextGraph, { resultNodeId: "resultText" }); +const updateTextAgentInfo = { + name: "updateTextAgent", + agent: updateTextAgent, + mock: updateTextAgent, + samples: [ + { + inputs: { newText: "new", oldText: "old" }, + params: {}, + result: { text: "new" }, + }, + { + inputs: { newText: "", oldText: "old" }, + params: {}, + result: { text: "old" }, + }, + ], + description: "", + category: [], + author: "", + repository: "", + tools: [], + license: "", + hasGraphData: true, +}; + const pushAgent = async ({ namedInputs, }) => { const extra_message = " Set inputs: { array: :arrayNodeId, item: :itemNodeId }"; agent_utils.arrayValidate("pushAgent", namedInputs, extra_message); @@ -1085,97 +1239,6 @@ const streamMockAgentInfo = { stream: true, }; -const nestedAgentGenerator = (graphData) => { - return async (context) => { - const { namedInputs, log, debugInfo, params, forNestedGraph } = context; - graphai.assert(!!forNestedGraph, "Please update graphai to 0.5.19 or higher"); - const { agents, graphOptions, onLogCallback } = forNestedGraph; - const { taskManager } = graphOptions; - const throwError = params.throwError ?? false; - if (taskManager) { - const status = taskManager.getStatus(false); - graphai.assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`); - } - graphai.assert(!!graphData, "nestedAgent: graph is required"); - const { nodes } = graphData; - const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphai.graphDataLatestVersion }; // deep enough copy - const nodeIds = Object.keys(namedInputs); - if (nodeIds.length > 0) { - nodeIds.forEach((nodeId) => { - if (nestedGraphData.nodes[nodeId] === undefined) { - // If the input node does not exist, automatically create a static node - nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] }; - } - else { - // Otherwise, inject the proper data here (instead of calling injectTo method later) - nestedGraphData.nodes[nodeId]["value"] = namedInputs[nodeId]; - } - }); - } - try { - if (nestedGraphData.version === undefined && debugInfo.version) { - nestedGraphData.version = debugInfo.version; - } - const graphAI = new graphai.GraphAI(nestedGraphData, agents || {}, graphOptions); - // for backward compatibility. Remove 'if' later - if (onLogCallback) { - graphAI.onLogCallback = onLogCallback; - } - const results = await graphAI.run(false); - log?.push(...graphAI.transactionLogs()); - return results; - } - catch (error) { - if (error instanceof Error && !throwError) { - return { - onError: { - message: error.message, - error, - }, - }; - } - throw error; - } - }; -}; -const nestedAgent = async (context) => { - const { forNestedGraph } = context; - const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } }; - graphai.assert(!!graphData, "No GraphData"); - return await nestedAgentGenerator(graphData)(context); -}; -const nestedAgentInfo = { - name: "nestedAgent", - agent: nestedAgent, - mock: nestedAgent, - samples: [ - { - inputs: { - message: "hello", - }, - params: {}, - result: { - test: ["hello"], - }, - graph: { - nodes: { - test: { - agent: "copyAgent", - params: { namedKey: "messages" }, - inputs: { messages: [":message"] }, - isResult: true, - }, - }, - }, - }, - ], - description: "nested Agent", - category: ["graph"], - author: "Receptron team", - repository: "https://github.com/receptron/graphai", - license: "MIT", -}; - const mapAgent = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => { graphai.assert(!!forNestedGraph, "Please update graphai to 0.5.19 or higher"); const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph; @@ -2623,5 +2686,6 @@ exports.stringEmbeddingsAgent = stringEmbeddingsAgentInfo; exports.stringSplitterAgent = stringSplitterAgentInfo; exports.stringTemplateAgent = stringTemplateAgentInfo; exports.totalAgent = totalAgentInfo; +exports.updateTextAgent = updateTextAgentInfo; exports.vanillaFetchAgent = vanillaFetchAgentInfo; //# sourceMappingURL=bundle.cjs.js.map diff --git a/agents/vanilla_agents/lib/bundle.cjs.js.map b/agents/vanilla_agents/lib/bundle.cjs.js.map index ee866afe..a94d5fef 100644 --- a/agents/vanilla_agents/lib/bundle.cjs.js.map +++ b/agents/vanilla_agents/lib/bundle.cjs.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.cjs.js","sources":["../src/string_agents/string_splitter_agent.ts","../src/string_agents/string_template_agent.ts","../src/string_agents/json_parser_agent.ts","../src/string_agents/string_case_variants_agent.ts","../src/array_agents/push_agent.ts","../src/array_agents/pop_agent.ts","../src/array_agents/shift_agent.ts","../src/array_agents/array_flat_agent.ts","../src/array_agents/array_join_agent.ts","../src/matrix_agents/dot_product_agent.ts","../src/matrix_agents/sort_by_values_agent.ts","../src/test_agents/echo_agent.ts","../src/test_agents/counting_agent.ts","../src/test_agents/copy_message_agent.ts","../src/test_agents/copy2array_agent.ts","../src/test_agents/merge_node_id_agent.ts","../src/test_agents/stream_mock_agent.ts","../src/graph_agents/nested_agent.ts","../src/graph_agents/map_agent.ts","../src/data_agents/total_agent.ts","../src/data_agents/data_sum_template_agent.ts","../src/data_agents/property_filter_agent.ts","../src/data_agents/copy_agent.ts","../src/service_agents/vanilla_fetch_agent.ts","../src/sleeper_agents/sleeper_agent.ts","../src/compare_agents/compare_agent.ts","../src/images_agents/image_to_message_agent.ts","../src/embedding_agent.ts"],"sourcesContent":["import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent strip one long string into chunks using following parameters\n//\n// chunkSize: number; // default is 2048\n// overlap: number; // default is 1/8th of chunkSize.\n//\n// see example\n// tests/agents/test_string_agent.ts\n//\nconst defaultChunkSize = 2048;\n\nexport const stringSplitterAgent: AgentFunction<\n {\n chunkSize?: number;\n overlap?: number;\n },\n {\n contents: Array;\n count: number;\n chunkSize: number;\n overlap: number;\n },\n {\n text: string;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"stringSplitterAgent: namedInputs is UNDEFINED!\");\n const source = namedInputs.text;\n const chunkSize = params.chunkSize ?? defaultChunkSize;\n const overlap = params.overlap ?? Math.floor(chunkSize / 8);\n const count = Math.floor(source.length / (chunkSize - overlap)) + 1;\n const contents = new Array(count).fill(undefined).map((_, i) => {\n const startIndex = i * (chunkSize - overlap);\n return source.substring(startIndex, startIndex + chunkSize);\n });\n\n return { contents, count, chunkSize, overlap };\n};\n\n// for test and document\nconst sampleInput = {\n text: \"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do.\",\n};\n\nconst sampleParams = { chunkSize: 64 };\nconst sampleResult = {\n contents: [\n \"Here's to the crazy ones, the misfits, the rebels, the troublema\",\n \"roublemakers, the round pegs in the square holes ... the ones wh\",\n \" ones who see things differently -- they're not fond of rules, a\",\n \"rules, and they have no respect for the status quo. ... You can \",\n \"You can quote them, disagree with them, glorify or vilify them, \",\n \"y them, but the only thing you can't do is ignore them because t\",\n \"ecause they change things. ... They push the human race forward,\",\n \"forward, and while some may see them as the crazy ones, we see g\",\n \"we see genius, because the people who are crazy enough to think \",\n \"o think that they can change the world, are the ones who do.\",\n \" do.\",\n ],\n count: 11,\n chunkSize: 64,\n overlap: 8,\n};\n\nconst stringSplitterAgentInfo: AgentFunctionInfo = {\n name: \"stringSplitterAgent\",\n agent: stringSplitterAgent,\n mock: stringSplitterAgent,\n inputs: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"text to be chuncked\",\n },\n },\n required: [\"text\"],\n },\n output: {\n type: \"object\",\n properties: {\n contents: {\n type: \"array\",\n description: \"the array of text chunks\",\n },\n count: {\n type: \"number\",\n description: \"the number of chunks\",\n },\n chunkSize: {\n type: \"number\",\n description: \"the chunk size\",\n },\n overlap: {\n type: \"number\",\n description: \"the overlap size\",\n },\n },\n },\n samples: [\n {\n inputs: sampleInput,\n params: sampleParams,\n result: sampleResult,\n },\n ],\n description: \"This agent strip one long string into chunks using following parameters\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringSplitterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, isObject } from \"graphai\";\n\ntype StringTemplate = string | Record;\ntype StringTemplateObject = StringTemplate | StringTemplate[] | Record;\n\nconst processTemplate: any = (template: StringTemplateObject, match: string, input: string) => {\n if (typeof template === \"string\") {\n if (template === match) {\n return input;\n }\n return template.replace(match, input);\n } else if (Array.isArray(template)) {\n return template.map((item: StringTemplate) => processTemplate(item, match, input));\n }\n\n if (isObject(template)) {\n return Object.keys(template).reduce((tmp: any, key: string) => {\n tmp[key] = processTemplate(template[key], match, input);\n return tmp;\n }, {});\n }\n return template;\n};\n\nexport const stringTemplateAgent: AgentFunction<\n {\n template: StringTemplateObject;\n },\n StringTemplateObject,\n Record\n> = async ({ params, namedInputs }) => {\n if (params.template === undefined) {\n if (namedInputs.text) {\n return namedInputs.text;\n }\n console.warn(\"warning: stringTemplateAgent no template\");\n }\n return Object.keys(namedInputs).reduce((template, key) => {\n return processTemplate(template, \"${\" + key + \"}\", namedInputs[key]);\n }, params.template);\n};\n\nconst sampleNamedInput = { message1: \"hello\", message2: \"test\" };\n\n// for test and document\nconst stringTemplateAgentInfo: AgentFunctionInfo = {\n name: \"stringTemplateAgent\",\n agent: stringTemplateAgent,\n mock: stringTemplateAgent,\n samples: [\n // named\n {\n inputs: sampleNamedInput,\n params: { template: \"${message1}: ${message2}\" },\n result: \"hello: test\",\n },\n {\n inputs: sampleNamedInput,\n params: { template: [\"${message1}: ${message2}\", \"${message2}: ${message1}\"] },\n result: [\"hello: test\", \"test: hello\"],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: \"${message2}\" } },\n result: { apple: \"hello\", lemon: \"test\" },\n },\n {\n inputs: sampleNamedInput,\n params: { template: [{ apple: \"${message1}\", lemon: \"${message2}\" }] },\n result: [{ apple: \"hello\", lemon: \"test\" }],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: [\"${message2}\"] } },\n result: { apple: \"hello\", lemon: [\"test\"] },\n },\n // graphData\n {\n inputs: { agent: \"openAiAgent\", row: \"hello world\", params: { text: \"message\" } },\n params: {\n template: {\n version: 0.5,\n nodes: {\n ai: {\n agent: \"${agent}\",\n isResult: true,\n params: \"${params}\",\n inputs: { prompt: \"${row}\" },\n },\n },\n },\n },\n result: {\n nodes: {\n ai: {\n agent: \"openAiAgent\",\n inputs: {\n prompt: \"hello world\",\n },\n isResult: true,\n params: { text: \"message\" },\n },\n },\n version: 0.5,\n },\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const jsonParserAgent: AgentFunction<\n null,\n unknown,\n {\n text: string;\n data: unknown;\n }\n> = async ({ namedInputs }) => {\n const { text, data } = namedInputs;\n\n if (data) {\n return JSON.stringify(data, null, 2);\n }\n const match = (\"\\n\" + text).match(/\\n```[a-zA-z]*([\\s\\S]*?)\\n```/);\n if (match) {\n return JSON.parse(match[1]);\n }\n return JSON.parse(text);\n};\n\nconst sample_object = { apple: \"red\", lemon: \"yellow\" };\n\nconst json_str = JSON.stringify(sample_object);\nconst md_json1 = [\"```\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json2 = [\"```json\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json3 = [\"```JSON\", json_str, \"```\"].join(\"\\n\");\n\nconst jsonParserAgentInfo: AgentFunctionInfo = {\n name: \"jsonParserAgent\",\n agent: jsonParserAgent,\n mock: jsonParserAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n type: \"string\",\n },\n samples: [\n {\n inputs: { data: sample_object },\n params: {},\n result: JSON.stringify(sample_object, null, 2),\n },\n {\n inputs: { text: JSON.stringify(sample_object, null, 2) },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json1 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json2 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json3 },\n params: {},\n result: sample_object,\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default jsonParserAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const stringCaseVariantsAgent: AgentFunction<\n { suffix?: string },\n { lowerCamelCase: string; snakeCase: string; kebabCase: string; normalized: string },\n { text: string }\n> = async ({ namedInputs, params }) => {\n const { suffix } = params;\n const normalizedArray = namedInputs.text\n .trim()\n .replace(/[\\s-_]+/g, \" \")\n .toLowerCase()\n .split(\" \");\n if (suffix && normalizedArray[normalizedArray.length - 1] !== suffix) {\n normalizedArray.push(suffix);\n }\n const normalized = normalizedArray.join(\" \");\n\n const lowerCamelCase = normalizedArray\n .map((word, index) => {\n if (index === 0) return word;\n return word.charAt(0).toUpperCase() + word.slice(1);\n })\n .join(\"\");\n\n const snakeCase = normalized.replace(/\\s+/g, \"_\");\n const kebabCase = normalized.replace(/\\s+/g, \"-\");\n\n return { lowerCamelCase, snakeCase, kebabCase, normalized };\n};\n\nconst stringCaseVariantsAgentInfo: AgentFunctionInfo = {\n name: \"stringCaseVariantsAgent\",\n agent: stringCaseVariantsAgent,\n mock: stringCaseVariantsAgent,\n samples: [\n {\n inputs: { text: \"this is a pen\" },\n params: {},\n result: {\n kebabCase: \"this-is-a-pen\",\n lowerCamelCase: \"thisIsAPen\",\n normalized: \"this is a pen\",\n snakeCase: \"this_is_a_pen\",\n },\n },\n {\n inputs: { text: \"string case variants\" },\n params: { suffix: \"agent\" },\n result: {\n kebabCase: \"string-case-variants-agent\",\n lowerCamelCase: \"stringCaseVariantsAgent\",\n normalized: \"string case variants agent\",\n snakeCase: \"string_case_variants_agent\",\n },\n },\n ],\n description: \"Format String Cases agent\",\n category: [\"string\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringCaseVariantsAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const pushAgent: AgentFunction }, { array: Array; item?: unknown; items: Array }> = async ({\n namedInputs,\n}) => {\n const extra_message = \" Set inputs: { array: :arrayNodeId, item: :itemNodeId }\";\n arrayValidate(\"pushAgent\", namedInputs, extra_message);\n const { item, items } = namedInputs;\n assert(!!(item || items), \"pushAgent: namedInputs.item is UNDEFINED!\" + extra_message);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n if (item) {\n array.push(item);\n } else {\n items.forEach((item) => {\n array.push(item);\n });\n }\n return {\n array,\n };\n};\n\nconst pushAgentInfo: AgentFunctionInfo = {\n name: \"pushAgent\",\n agent: pushAgent,\n mock: pushAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to push an item to\",\n },\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n items: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2], item: 3 },\n params: {},\n result: { array: [1, 2, 3] },\n },\n {\n inputs: { array: [{ apple: 1 }], item: { lemon: 2 } },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }] },\n },\n {\n inputs: { array: [{ apple: 1 }], items: [{ lemon: 2 }, { banana: 3 }] },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }, { banana: 3 }] },\n },\n ],\n description: \"push Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default pushAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const popAgent: AgentFunction; item: unknown }, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"popAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.pop();\n return { array, item };\n};\n\nconst popAgentInfo: AgentFunctionInfo = {\n name: \"popAgent\",\n agent: popAgent,\n mock: popAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to pop an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item popped from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"a\", \"b\"],\n item: \"c\",\n },\n },\n {\n inputs: {\n array: [1, 2, 3],\n array2: [\"a\", \"b\", \"c\"],\n },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n ],\n description: \"Pop Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default popAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const shiftAgent: AgentFunction, Record, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"shiftAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.shift();\n return { array, item };\n};\n\nconst shiftAgentInfo: AgentFunctionInfo = {\n name: \"shiftAgent\",\n agent: shiftAgent,\n mock: shiftAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to shift an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item shifted from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [2, 3],\n item: 1,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"b\", \"c\"],\n item: \"a\",\n },\n },\n ],\n description: \"shift Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default shiftAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayFlatAgent: AgentFunction<{ depth?: number }, { array: Array }, { array: Array }> = async ({ namedInputs, params }) => {\n arrayValidate(\"arrayFlatAgent\", namedInputs);\n const depth = params.depth ?? 1;\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n return { array: array.flat(depth) };\n};\n\nconst arrayFlatAgentInfo: AgentFunctionInfo = {\n name: \"arrayFlatAgent\",\n agent: arrayFlatAgent,\n mock: arrayFlatAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"flat array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n params: {\n type: \"object\",\n properties: {\n depth: {\n type: \"number\",\n description: \"array depth\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n array: [1, 2, [3]],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: { depth: 2 },\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n array: [\"a\", \"b\", \"c\"],\n },\n },\n ],\n description: \"Array Flat Agent\",\n category: [\"array\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n cacheType: \"pureAgent\",\n license: \"MIT\",\n};\nexport default arrayFlatAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayJoinAgent: AgentFunction<{ separator?: string; flat?: number }, { text: string }, { array: Array }> = async ({\n namedInputs,\n params,\n}) => {\n arrayValidate(\"arrayJoinAgent\", namedInputs);\n const separator = params.separator ?? \"\";\n const { flat } = params;\n\n const text = flat ? namedInputs.array.flat(flat).join(separator) : namedInputs.array.join(separator);\n return { text };\n};\n\nconst arrayJoinAgentInfo: AgentFunctionInfo = {\n name: \"arrayJoinAgent\",\n agent: arrayJoinAgent,\n mock: arrayJoinAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"array join\",\n },\n },\n required: [\"array\"],\n },\n params: {\n type: \"object\",\n properties: {\n separator: {\n type: \"string\",\n description: \"array join separator\",\n },\n flat: {\n type: \"number\",\n description: \"array flat depth\",\n },\n },\n },\n output: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"joined text\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n text: \"abc\",\n },\n },\n //\n {\n inputs: { array: [[1], [2], [3]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 2 },\n result: {\n text: \"1|2|3\",\n },\n },\n ],\n description: \"Array Join Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default arrayJoinAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent calculates the dot product of an array of vectors (A[]) and a vector (B),\n// typically used to calculate cosine similarity of embedding vectors.\n// Inputs:\n// matrix: Two dimentional array of numbers.\n// vector: One dimentional array of numbers.\n// Outputs:\n// { contents: Array } // array of docProduct of each vector (A[]) and vector B\nexport const dotProductAgent: AgentFunction, Array, { matrix: Array>; vector: Array }> = async ({\n namedInputs,\n}) => {\n assert(!!namedInputs, \"dotProductAgent: namedInputs is UNDEFINED!\");\n const matrix = namedInputs.matrix as Array>;\n const vector = namedInputs.vector as Array;\n if (matrix[0].length != vector.length) {\n throw new Error(`dotProduct: Length of vectors do not match. ${matrix[0].length}, ${vector.length}`);\n }\n const contents = matrix.map((vector0) => {\n return vector0.reduce((dotProduct: number, value, index) => {\n return dotProduct + value * vector[index];\n }, 0);\n });\n return contents;\n};\n\nconst dotProductAgentInfo: AgentFunctionInfo = {\n name: \"dotProductAgent\",\n agent: dotProductAgent,\n mock: dotProductAgent,\n inputs: {\n type: \"object\",\n properties: {\n matrix: {\n type: \"array\",\n description: \"two dimentional matrix\",\n items: {\n type: \"array\",\n items: {\n type: \"number\",\n },\n },\n },\n vector: {\n type: \"array\",\n description: \"the vector\",\n items: {\n type: \"number\",\n },\n },\n },\n required: [\"matrix\", \"vector\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n matrix: [\n [1, 2],\n [3, 4],\n [5, 6],\n ],\n vector: [3, 2],\n },\n params: {},\n result: [7, 17, 27],\n },\n {\n inputs: {\n matrix: [\n [1, 2],\n [2, 3],\n ],\n vector: [1, 2],\n },\n params: {},\n result: [5, 8],\n },\n ],\n description: \"dotProduct Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dotProductAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent returned a sorted array of one array (A) based on another array (B).\n// The default sorting order is \"decendant\".\n//\n// Parameters:\n// acendant: Specifies if the sorting order should be acendant. The default is \"false\" (decendant).\n// Inputs:\n// array: Array; // array to be sorted\n// values: Array; // array of numbers for sorting\n//\nexport const sortByValuesAgent: AgentFunction<\n {\n assendant?: boolean;\n },\n Array,\n {\n array: Array;\n values: Array;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"sortByValue: namedInputs is UNDEFINED!\");\n assert(!!namedInputs.array, \"sortByValue: namedInputs.array is UNDEFINED!\");\n assert(!!namedInputs.values, \"sortByValue: namedInputs.values is UNDEFINED!\");\n\n const direction = (params?.assendant ?? false) ? -1 : 1;\n const array: Array = namedInputs.array;\n const values: Array = namedInputs.values;\n const joined = array.map((item, index) => {\n return { item, value: values[index] };\n });\n const contents = joined\n .sort((a, b) => {\n return (b.value - a.value) * direction;\n })\n .map((a) => {\n return a.item;\n });\n return contents;\n};\n\nconst sortByValuesAgentInfo: AgentFunctionInfo = {\n name: \"sortByValuesAgent\",\n agent: sortByValuesAgent,\n mock: sortByValuesAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to sort\",\n },\n values: {\n type: \"array\",\n description: \"values associated with items in the array\",\n },\n },\n required: [\"array\", \"values\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {},\n result: [\"lemon\", \"orange\", \"apple\", \"banana\"],\n },\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {\n assendant: true,\n },\n result: [\"banana\", \"apple\", \"orange\", \"lemon\"],\n },\n ],\n description: \"sortByValues Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sortByValuesAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const echoAgent: AgentFunction = async ({ params, filterParams }) => {\n if (params.filterParams) {\n return filterParams;\n }\n return params;\n};\n\n// for test and document\nconst echoAgentInfo: AgentFunctionInfo = {\n name: \"echoAgent\",\n agent: echoAgent,\n mock: echoAgent,\n samples: [\n {\n inputs: {},\n params: { text: \"this is test\" },\n result: { text: \"this is test\" },\n },\n {\n inputs: {},\n params: {\n text: \"If you add filterParams option, it will respond to filterParams\",\n filterParams: true,\n },\n result: {},\n },\n ],\n description: \"Echo agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default echoAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const countingAgent: AgentFunction<{ count: number }, { list: number[] }> = async ({ params }) => {\n return {\n list: new Array(params.count).fill(undefined).map((_, i) => {\n return i;\n }),\n };\n};\n\n// for test and document\nconst countingAgentInfo: AgentFunctionInfo = {\n name: \"countingAgent\",\n agent: countingAgent,\n mock: countingAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4 },\n result: { list: [0, 1, 2, 3] },\n },\n ],\n description: \"Counting agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default countingAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const copyMessageAgent: AgentFunction<{ count: number; message: string }, { messages: string[] }> = async ({ params }) => {\n return {\n messages: new Array(params.count).fill(undefined).map(() => {\n return params.message;\n }),\n };\n};\n\n// for test and document\nconst copyMessageAgentInfo: AgentFunctionInfo = {\n name: \"copyMessageAgent\",\n agent: copyMessageAgent,\n mock: copyMessageAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4, message: \"hello\" },\n result: { messages: [\"hello\", \"hello\", \"hello\", \"hello\"] },\n },\n ],\n description: \"CopyMessage agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copyMessageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copy2ArrayAgent: AgentFunction<{ count: number }> = async ({ namedInputs, params }) => {\n assert(isNamedInputs(namedInputs), \"copy2ArrayAgent: namedInputs is UNDEFINED!\");\n const input = namedInputs.item ? namedInputs.item : namedInputs;\n return new Array(params.count).fill(undefined).map(() => {\n return input;\n });\n};\n\n// for test and document\nconst copy2ArrayAgentInfo: AgentFunctionInfo = {\n name: \"copy2ArrayAgent\",\n agent: copy2ArrayAgent,\n mock: copy2ArrayAgent,\n samples: [\n {\n inputs: { item: { message: \"hello\" } },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { message: \"hello\" },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { item: \"hello\" },\n params: { count: 10 },\n result: [\"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\"],\n },\n ],\n description: \"Copy2Array agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copy2ArrayAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const mergeNodeIdAgent: AgentFunction, { array: Record[] }> = async ({\n debugInfo: { nodeId },\n namedInputs,\n}) => {\n arrayValidate(\"mergeNodeIdAgent\", namedInputs);\n\n const dataSet = namedInputs.array;\n\n return dataSet.reduce(\n (tmp, input) => {\n return { ...tmp, ...input };\n },\n { [nodeId]: \"hello\" },\n );\n};\n\n// for test and document\nconst mergeNodeIdAgentInfo: AgentFunctionInfo = {\n name: \"mergeNodeIdAgent\",\n agent: mergeNodeIdAgent,\n mock: mergeNodeIdAgent,\n samples: [\n {\n inputs: { array: [{ message: \"hello\" }] },\n params: {},\n result: {\n message: \"hello\",\n test: \"hello\",\n },\n },\n ],\n description: \"merge node id agent\",\n category: [\"test\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default mergeNodeIdAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const streamMockAgent: AgentFunction = async ({ params, filterParams, namedInputs }) => {\n const message = params.message ?? namedInputs.message ?? \"\";\n\n for await (const token of message.split(\"\")) {\n if (filterParams.streamTokenCallback) {\n filterParams.streamTokenCallback(token);\n }\n await sleep(params.sleep || 100);\n }\n\n return { message };\n};\n\n// for test and document\nconst streamMockAgentInfo: AgentFunctionInfo = {\n name: \"streamMockAgent\",\n agent: streamMockAgent,\n mock: streamMockAgent,\n inputs: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n message: {\n type: \"string\",\n description: \"streaming message\",\n },\n },\n },\n {\n type: \"array\",\n },\n ],\n },\n samples: [\n {\n inputs: {},\n params: { message: \"this is params test\" },\n result: { message: \"this is params test\" },\n },\n {\n inputs: { message: \"this is named inputs test\" },\n params: {},\n result: { message: \"this is named inputs test\" },\n },\n ],\n description: \"Stream mock agent\",\n category: [\"test\"],\n author: \"Isamu Arimoto\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n stream: true,\n};\n\nexport default streamMockAgentInfo;\n","import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, StaticNodeData, GraphData } from \"graphai\";\nimport { GraphAI, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const nestedAgentGenerator: (graphData: GraphData) => (context: AgentFunctionContext) => Promise = (graphData: GraphData) => {\n return async (context: AgentFunctionContext) => {\n const { namedInputs, log, debugInfo, params, forNestedGraph } = context;\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n const throwError = params.throwError ?? false;\n if (taskManager) {\n const status = taskManager.getStatus(false);\n assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`);\n }\n assert(!!graphData, \"nestedAgent: graph is required\");\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n if (nodeIds.length > 0) {\n nodeIds.forEach((nodeId) => {\n if (nestedGraphData.nodes[nodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] };\n } else {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n (nestedGraphData.nodes[nodeId] as StaticNodeData)[\"value\"] = namedInputs[nodeId];\n }\n });\n }\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n\n const results = await graphAI.run(false);\n log?.push(...graphAI.transactionLogs());\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n };\n};\n\nexport const nestedAgent: AgentFunction<{ throwError?: boolean }> = async (context) => {\n const { forNestedGraph } = context;\n const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } };\n assert(!!graphData, \"No GraphData\");\n\n return await nestedAgentGenerator(graphData)(context);\n};\n\nconst nestedAgentInfo: AgentFunctionInfo = {\n name: \"nestedAgent\",\n agent: nestedAgent,\n mock: nestedAgent,\n samples: [\n {\n inputs: {\n message: \"hello\",\n },\n params: {},\n result: {\n test: [\"hello\"],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"messages\" },\n inputs: { messages: [\":message\"] },\n isResult: true,\n },\n },\n },\n },\n ],\n description: \"nested Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default nestedAgentInfo;\n","import { GraphAI, AgentFunction, AgentFunctionInfo, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const mapAgent: AgentFunction<\n {\n limit?: number;\n resultAll?: boolean;\n compositeResult?: boolean;\n throwError?: boolean;\n },\n Record\n> = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => {\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n\n if (taskManager) {\n const status = taskManager.getStatus();\n assert(status.concurrency > status.running, `mapAgent: Concurrency is too low: ${status.concurrency}`);\n }\n\n assert(!!namedInputs.rows, \"mapAgent: rows property is required in namedInput\");\n assert(!!graphData, \"mapAgent: graph is required\");\n\n const rows = namedInputs.rows.map((item: any) => item);\n if (params.limit && params.limit < rows.length) {\n rows.length = params.limit; // trim\n }\n const resultAll = params.resultAll ?? false;\n const throwError = params.throwError ?? false;\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n nestedGraphData.nodes[\"__mapIndex\"] = {};\n nodeIds.forEach((nodeId) => {\n const mappedNodeId = nodeId === \"rows\" ? \"row\" : nodeId;\n if (nestedGraphData.nodes[mappedNodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[mappedNodeId] = { value: namedInputs[nodeId] };\n } else if (!(\"agent\" in nestedGraphData.nodes[mappedNodeId])) {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n nestedGraphData.nodes[mappedNodeId][\"value\"] = namedInputs[nodeId];\n }\n });\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphs: Array = rows.map((row: any, index: number) => {\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n graphAI.injectValue(\"row\", row, \"__mapAgent_inputs__\");\n graphAI.injectValue(\"__mapIndex\", index, \"__mapAgent_inputs__\");\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n return graphAI;\n });\n\n const runs = graphs.map((graph) => {\n return graph.run(resultAll);\n });\n const results = await Promise.all(runs);\n const nodeIds = Object.keys(results[0]);\n // assert(nodeIds.length > 0, \"mapAgent: no return values (missing isResult)\");\n\n if (log) {\n const logs = graphs.map((graph, index) => {\n return graph.transactionLogs().map((log) => {\n log.mapIndex = index;\n return log;\n });\n });\n log.push(...logs.flat());\n }\n\n if (params.compositeResult) {\n const compositeResult = nodeIds.reduce((tmp: Record>, nodeId) => {\n tmp[nodeId] = results.map((result) => {\n return result[nodeId];\n });\n return tmp;\n }, {});\n return compositeResult;\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n};\n\nconst mapAgentInfo: AgentFunctionInfo = {\n name: \"mapAgent\",\n agent: mapAgent,\n mock: mapAgent,\n samples: [\n {\n inputs: {\n rows: [1, 2],\n },\n params: {},\n result: [{ test: [1] }, { test: [2] }],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${word}.\",\n },\n inputs: { word: \":row\" },\n isResult: true,\n },\n },\n },\n result: [\n { node2: \"I love apple.\" },\n { node2: \"I love orange.\" },\n { node2: \"I love banana.\" },\n { node2: \"I love lemon.\" },\n { node2: \"I love melon.\" },\n { node2: \"I love pineapple.\" },\n { node2: \"I love tomato.\" },\n ],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${item}.\",\n },\n inputs: { item: \":row.fruit\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"I love apple.\" }, { node2: \"I love orange.\" }],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n name: \"You\",\n verb: \"like\",\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"${name} ${verb} ${fruit}.\",\n },\n inputs: { fruit: \":row.fruit\", name: \":name\", verb: \":verb\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"You like apple.\" }, { node2: \"You like orange.\" }],\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n test: [1],\n row: 1,\n },\n {\n __mapIndex: 1,\n test: [2],\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n map: [\n {\n test: 1,\n },\n {\n test: 1,\n },\n ],\n row: 1,\n test: 1,\n },\n {\n __mapIndex: 1,\n map: [\n {\n test: 2,\n },\n {\n test: 2,\n },\n ],\n test: 2,\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n },\n },\n },\n },\n },\n },\n\n // old response\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${row}.\",\n },\n inputs: { row: \":row\" },\n isResult: true,\n },\n },\n },\n result: {\n node2: [\"I love apple.\", \"I love orange.\", \"I love banana.\", \"I love lemon.\", \"I love melon.\", \"I love pineapple.\", \"I love tomato.\"],\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n __mapIndex: [0, 1],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n __mapIndex: [0, 1],\n test: [[1], [2]],\n map: [\n {\n test: [[[1]], [[1]]],\n },\n {\n test: [[[2]], [[2]]],\n },\n ],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n },\n },\n },\n ],\n description: \"Map Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default mapAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const totalAgent: AgentFunction, Record, { array: Record[] }> = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((result, input) => {\n const inputArray = Array.isArray(input) ? input : [input];\n inputArray.forEach((innerInput) => {\n Object.keys(innerInput).forEach((key) => {\n const value = innerInput[key];\n if (result[key]) {\n result[key] += value;\n } else {\n result[key] = value;\n }\n });\n });\n return result;\n }, {});\n};\n\n//\nconst totalAgentInfo: AgentFunctionInfo = {\n name: \"totalAgent\",\n agent: totalAgent,\n mock: totalAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: { array: [[{ a: 1, b: -1 }, { c: 10 }], [{ a: 2, b: -1 }], [{ a: 3, b: -2 }, { d: -10 }]] },\n params: {},\n result: { a: 6, b: -4, c: 10, d: -10 },\n },\n {\n inputs: { array: [{ a: 1 }] },\n params: {},\n result: { a: 1 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }] },\n params: {},\n result: { a: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: {\n array: [\n { a: 1, b: 1 },\n { a: 2, b: 2 },\n { a: 3, b: 0 },\n ],\n },\n params: {},\n result: { a: 6, b: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2, b: 2 }, { a: 3, b: 0 }] },\n params: {},\n result: { a: 6, b: 2 },\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default totalAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const dataSumTemplateAgent: AgentFunction = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((tmp, input) => {\n return tmp + input;\n }, 0);\n};\n\nconst dataSumTemplateAgentInfo: AgentFunctionInfo = {\n name: \"dataSumTemplateAgent\",\n agent: dataSumTemplateAgent,\n mock: dataSumTemplateAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of numbers to calculate the sum of\",\n items: {\n type: \"integer\",\n },\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"number\",\n },\n samples: [\n {\n inputs: { array: [1] },\n params: {},\n result: 1,\n },\n {\n inputs: { array: [1, 2] },\n params: {},\n result: 3,\n },\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: 6,\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dataSumTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nconst applyFilter = (\n object: any,\n index: number,\n arrayInputs: any,\n include: Array | undefined,\n exclude: Array | undefined,\n alter: Record> | undefined,\n inject: Array> | undefined,\n swap: Record | undefined,\n inspect: Array> | undefined,\n) => {\n const propIds = include ? include : Object.keys(object);\n const excludeSet = new Set(exclude ?? []);\n const result = propIds.reduce((tmp: Record, propId) => {\n if (!excludeSet.has(propId)) {\n const mapping = alter && alter[propId];\n if (mapping && mapping[object[propId]]) {\n tmp[propId] = mapping[object[propId]];\n } else {\n tmp[propId] = object[propId];\n }\n }\n return tmp;\n }, {});\n\n if (inject) {\n inject.forEach((item) => {\n if (item.index === undefined || item.index === index) {\n result[item.propId] = arrayInputs[item.from];\n }\n });\n }\n if (inspect) {\n inspect.forEach((item) => {\n const value = arrayInputs[item.from ?? 1]; // default is arrayInputs[1]\n if (item.equal) {\n result[item.propId] = item.equal === value;\n } else if (item.notEqual) {\n result[item.propId] = item.notEqual !== value;\n }\n });\n }\n if (swap) {\n Object.keys(swap).forEach((key) => {\n const tmp = result[key];\n result[key] = result[swap[key]];\n result[swap[key]] = tmp;\n });\n }\n return result;\n};\n\nexport const propertyFilterAgent: AgentFunction<{\n include?: Array;\n exclude?: Array;\n alter?: Record>;\n inject?: Array>;\n inspect?: Array>;\n swap?: Record;\n}> = async ({ namedInputs, params }) => {\n const { include, exclude, alter, inject, swap, inspect } = params;\n const { array, item } = namedInputs;\n if (array) {\n // This is advanced usage, including \"inject\" and \"inspect\", which uses\n // array[1], array[2], ...\n const [target] = array; // Extract the first one\n if (Array.isArray(target)) {\n return target.map((item, index) => applyFilter(item, index, array, include, exclude, alter, inject, swap, inspect));\n }\n return applyFilter(target, 0, array, include, exclude, alter, inject, swap, inspect);\n } else if (item) {\n return applyFilter(item, 0, [], include, exclude, alter, inject, swap, inspect);\n }\n return false;\n};\n\nconst testInputs = {\n array: [\n [\n { color: \"red\", model: \"Model 3\", type: \"EV\", maker: \"Tesla\", range: 300 },\n { color: \"blue\", model: \"Model Y\", type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n \"Tesla Motors\",\n ],\n};\n\nconst propertyFilterAgentInfo: AgentFunctionInfo = {\n name: \"propertyFilterAgent\",\n agent: propertyFilterAgent,\n mock: propertyFilterAgent,\n inputs: {\n type: \"object\",\n },\n output: {\n type: \"any\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to apply filter\",\n },\n item: {\n type: \"object\",\n description: \"the object to apply filter\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [testInputs.array[0][0]] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: testInputs,\n params: { include: [\"color\", \"model\"] },\n result: [\n { color: \"red\", model: \"Model 3\" },\n { color: \"blue\", model: \"Model Y\" },\n ],\n },\n {\n inputs: testInputs,\n params: { exclude: [\"color\", \"model\"] },\n result: [\n { type: \"EV\", maker: \"Tesla\", range: 300 },\n { type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { exclude: [\"color\", \"model\"] },\n result: { type: \"EV\", maker: \"Tesla\", range: 300 },\n },\n {\n inputs: testInputs,\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: [\n {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n {\n color: \"red\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { swap: { maker: \"model\" } },\n result: [\n {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model Y\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { swap: { maker: \"model\" } },\n result: {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1, index: 0 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: {\n inspect: [\n { propId: \"isTesla\", equal: \"Tesla Motors\" }, // from: 1 is implied\n { propId: \"isGM\", notEqual: \"Tesla Motors\", from: 1 },\n ],\n },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n isTesla: true,\n isGM: false,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n isTesla: true,\n isGM: false,\n },\n ],\n },\n ],\n description: \"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default propertyFilterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copyAgent: AgentFunction<{\n namedKey?: string;\n}> = async ({ namedInputs, params }) => {\n const { namedKey } = params;\n assert(isNamedInputs(namedInputs), \"copyAgent: namedInputs is UNDEFINED!\");\n if (namedKey) {\n return namedInputs[namedKey];\n }\n return namedInputs;\n};\n\nconst copyAgentInfo: AgentFunctionInfo = {\n name: \"copyAgent\",\n agent: copyAgent,\n mock: copyAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n samples: [\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: {},\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { array: [\"Hello World\", \"Discarded\"] },\n params: {},\n result: { array: [\"Hello World\", \"Discarded\"] },\n },\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: { namedKey: \"color\" },\n result: \"red\",\n },\n ],\n description: \"Returns namedInputs\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default copyAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const vanillaFetchAgent: AgentFunction<{ debug?: boolean; type?: string; throwError?: boolean }, any, any> = async ({ namedInputs, params }) => {\n const { url, method, queryParams, headers, body } = namedInputs;\n const throwError = params.throwError ?? false;\n\n const url0 = new URL(url);\n const headers0 = headers ? { ...headers } : {};\n\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n url0.search = params.toString();\n }\n\n if (body) {\n headers0[\"Content-Type\"] = \"application/json\";\n }\n\n const fetchOptions: RequestInit = {\n method: (method ?? body) ? \"POST\" : \"GET\",\n headers: new Headers(headers0),\n body: body ? JSON.stringify(body) : undefined,\n };\n\n if (params?.debug) {\n return {\n url: url0.toString(),\n method: fetchOptions.method,\n headers: headers0,\n body: fetchOptions.body,\n };\n }\n\n const response = await fetch(url0.toString(), fetchOptions);\n\n if (!response.ok) {\n const status = response.status;\n const type = params?.type ?? \"json\";\n const error = type === \"json\" ? await response.json() : await response.text();\n if (throwError) {\n throw new Error(`HTTP error: ${status}`);\n }\n return {\n onError: {\n message: `HTTP error: ${status}`,\n status,\n error,\n },\n };\n }\n\n const result = await (async () => {\n const type = params?.type ?? \"json\";\n if (type === \"json\") {\n return await response.json();\n } else if (type === \"text\") {\n return response.text();\n }\n throw new Error(`Unknown Type! ${type}`);\n })();\n\n return result;\n};\n\nconst vanillaFetchAgentInfo: AgentFunctionInfo = {\n name: \"vanillaFetchAgent\",\n agent: vanillaFetchAgent,\n mock: vanillaFetchAgent,\n inputs: {\n type: \"object\",\n properties: {\n url: {\n type: \"string\",\n description: \"baseurl\",\n },\n method: {\n type: \"string\",\n description: \"HTTP method\",\n },\n headers: {\n type: \"object\",\n description: \"HTTP headers\",\n },\n quaryParams: {\n type: \"object\",\n description: \"Query parameters\",\n },\n body: {\n anyOf: [{ type: \"string\" }, { type: \"object\" }],\n description: \"body\",\n },\n },\n required: [\"url\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: { url: \"https://www.google.com\", queryParams: { foo: \"bar\" }, headers: { \"x-myHeader\": \"secret\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"GET\",\n url: \"https://www.google.com/?foo=bar\",\n headers: {\n \"x-myHeader\": \"secret\",\n },\n body: undefined,\n },\n },\n {\n inputs: { url: \"https://www.google.com\", body: { foo: \"bar\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"POST\",\n url: \"https://www.google.com/\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ foo: \"bar\" }),\n },\n },\n ],\n description: \"Retrieves JSON data from the specified URL\",\n category: [\"service\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default vanillaFetchAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const sleeperAgent: AgentFunction<{ duration?: number }> = async ({ params, namedInputs }) => {\n await sleep(params?.duration ?? 10);\n return namedInputs;\n};\n\nconst sleeperAgentInfo: AgentFunctionInfo = {\n name: \"sleeperAgent\",\n agent: sleeperAgent,\n mock: sleeperAgent,\n samples: [\n {\n inputs: {},\n params: { duration: 1 },\n result: {},\n },\n {\n inputs: { array: [{ a: 1 }, { b: 2 }] },\n params: { duration: 1 },\n result: {\n array: [{ a: 1 }, { b: 2 }],\n },\n },\n ],\n description: \"sleeper Agent\",\n category: [\"sleeper\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sleeperAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\ntype CompareDataItem = string | number | boolean | CompareData;\ntype CompareData = CompareDataItem[];\n\nconst compare = (_array: CompareData): boolean => {\n if (_array.length !== 3) {\n throw new Error(`compare inputs length must must be 3`);\n }\n const array = _array.map((value) => {\n if (Array.isArray(value)) {\n return compare(value);\n }\n return value;\n });\n const [a, operator, b] = array;\n if (operator === \"==\") {\n return a === b;\n }\n if (operator === \"!=\") {\n return a !== b;\n }\n if (operator === \">\") {\n return Number(a) > Number(b);\n }\n if (operator === \">=\") {\n return Number(a) >= Number(b);\n }\n if (operator === \"<\") {\n return Number(a) < Number(b);\n }\n if (operator === \"<=\") {\n return Number(a) <= Number(b);\n }\n if (operator === \"||\") {\n return !!a || !!b;\n }\n if (operator === \"&&\") {\n return !!a && !!b;\n }\n if (operator === \"XOR\") {\n return !!a === !b;\n }\n throw new Error(`unknown compare operator`);\n};\n\nexport const compareAgent: AgentFunction = async ({ namedInputs, params }) => {\n const ret = compare(namedInputs.array);\n if (params?.value) {\n return params?.value[ret ? \"true\" : \"false\"] ?? ret;\n }\n return ret;\n};\n\nconst compareAgentInfo: AgentFunctionInfo = {\n name: \"compareAgent\",\n agent: compareAgent,\n mock: compareAgent,\n inputs: {},\n output: {},\n samples: [\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"a\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abca\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"b\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abcd\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abc\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abcd\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"15\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">\", 15] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \">=\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 10\n inputs: { array: [\"10\", \">=\", \"19\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">=\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 19] },\n params: {},\n result: false,\n },\n //\n\n {\n inputs: { array: [\"10\", \"<\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<\", \"15\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<\", 15] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 20\n inputs: { array: [\"10\", \"<=\", \"19\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 19] },\n params: {},\n result: true,\n },\n\n {\n inputs: { array: [true, \"||\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"||\", false] },\n params: {},\n result: false,\n },\n\n {\n inputs: { array: [true, \"&&\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"&&\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [true, \"XOR\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"XOR\", true] },\n params: {},\n result: false,\n },\n //\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"||\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [[[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"bbb\", \"==\", \"bbb\"]], \"||\", [\"aaa\", \"&&\", \"bbb\"]] },\n params: {},\n result: true,\n },\n ],\n description: \"compare\",\n category: [\"compare\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default compareAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\n// https://platform.openai.com/docs/guides/vision\nconst getImageUrl = (data: string, imageType: string, detail?: string) => {\n if (imageType === \"http\") {\n return {\n url: data,\n };\n }\n const dataUrl = `data:image/${imageType};base64,${data}`;\n return {\n url: dataUrl,\n detail: detail ?? \"auto\",\n };\n};\n\ntype Content = { type: string; image_url: { url: string; detail?: string } } | { type: string; text: string };\n\nexport const images2messageAgent: AgentFunction<\n {\n imageType: string;\n detail?: string;\n },\n {\n message: {\n role: \"user\";\n content: Content[];\n };\n },\n {\n array: string[];\n prompt?: string;\n }\n> = async ({ namedInputs, params }) => {\n const { imageType, detail } = params;\n const { array, prompt } = namedInputs;\n arrayValidate(\"images2messageAgent\", namedInputs);\n assert(!!imageType, \"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...\");\n\n const contents: Content[] = array.map((base64ImageData) => {\n const image_url = getImageUrl(base64ImageData, imageType, detail);\n return {\n type: \"image_url\",\n image_url,\n };\n });\n\n if (prompt) {\n contents.unshift({ type: \"text\", text: prompt });\n }\n\n return {\n message: {\n role: \"user\",\n content: contents,\n },\n };\n};\n\nconst images2messageAgentInfo: AgentFunctionInfo = {\n name: \"images2messageAgent\",\n agent: images2messageAgent,\n mock: images2messageAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of base64 image data\",\n },\n prompt: {\n type: \"string\",\n description: \"prompt message\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [\"abcabc\", \"122123\"] },\n params: { imageType: \"png\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"abcabc\", \"122123\"], prompt: \"hello\" },\n params: { imageType: \"jpg\", detail: \"high\" },\n result: {\n message: {\n content: [\n {\n type: \"text\",\n text: \"hello\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"http://example.com/1.jpg\", \"http://example.com/2.jpg\"] },\n params: { imageType: \"http\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n url: \"http://example.com/1.jpg\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n url: \"http://example.com/2.jpg\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n ],\n description: \"Returns the message data for llm include image\",\n category: [\"image\"],\n author: \"Receptron team\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default images2messageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\n// Type for OpenAI's Embedding API\ninterface EmbeddingResponse {\n object: string;\n model: string;\n usage: {\n prompt_tokens: number;\n total_tokens: number;\n };\n data: [\n {\n object: string;\n index: number;\n embedding: number[];\n },\n ];\n}\n\nconst defaultEmbeddingModel = \"text-embedding-3-small\";\nconst OpenAI_embedding_API = \"https://api.openai.com/v1/embeddings\";\n\n// This agent retrieves embedding vectors for an array of strings using OpenAI's API\n//\n// Parameters:\n// model: Specifies the model (default is \"text-embedding-3-small\")\n// NamedInputs:\n// array: Array\n// item: string,\n// Result:\n// contents: Array>\n//\nexport const stringEmbeddingsAgent: AgentFunction<\n {\n model?: string;\n },\n number[][],\n { array: Array; item: string }\n> = async ({ params, namedInputs }) => {\n const { array, item } = namedInputs;\n\n const sources = array ?? [item];\n const apiKey = process.env.OPENAI_API_KEY;\n if (!apiKey) {\n throw new Error(\"OPENAI_API_KEY key is not set in environment variables.\");\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${apiKey}`,\n };\n\n const response = await fetch(OpenAI_embedding_API, {\n method: \"POST\",\n headers: headers,\n body: JSON.stringify({\n input: sources,\n model: params?.model ?? defaultEmbeddingModel,\n }),\n });\n const jsonResponse: EmbeddingResponse = await response.json();\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const embeddings = jsonResponse.data.map((object) => {\n return object.embedding;\n });\n return embeddings;\n};\n\nconst stringEmbeddingsAgentInfo: AgentFunctionInfo = {\n name: \"stringEmbeddingsAgent\",\n agent: stringEmbeddingsAgent,\n mock: stringEmbeddingsAgent,\n samples: [],\n description: \"Embeddings Agent\",\n category: [\"embedding\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringEmbeddingsAgentInfo;\n"],"names":["assert","isObject","arrayValidate","isNamedInputs","sleep","graphDataLatestVersion","GraphAI"],"mappings":";;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,IAAI;AAEtB,MAAM,mBAAmB,GAc5B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAI;AACpC,IAAAA,cAAM,CAAC,CAAC,CAAC,WAAW,EAAE,gDAAgD,CAAC;AACvE,IAAA,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI;AAC/B,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,gBAAgB;AACtD,IAAA,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC;AAC3D,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC;IACnE,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;QAC7D,MAAM,UAAU,GAAG,CAAC,IAAI,SAAS,GAAG,OAAO,CAAC;QAC5C,OAAO,MAAM,CAAC,SAAS,CAAC,U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AE,CAAA,CAAC;;IAE3D,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAI;QAClD,OAAO,MAAM,CAAC,SAAS;AACzB,KAAC,CAAC;AACF,IAAA,OAAO,UAAU;AACnB,CAAC;AAED,MAAM,yBAAyB,GAAsB;AACnD,IAAA,IAAI,EAAE,uBAAuB;AAC7B,IAAA,KAAK,EAAE,qBAAqB;AAC5B,IAAA,IAAI,EAAE,qBAAqB;AAC3B,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,WAAW,EAAE,kBAAkB;IAC/B,QAAQ,EAAE,CAAC,WAAW,CAAC;AACvB,IAAA,MAAM,EAAE,gBAAgB;AACxB,IAAA,UAAU,EAAE,sCAAsC;AAClD,IAAA,OAAO,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"bundle.cjs.js","sources":["../src/string_agents/string_splitter_agent.ts","../src/string_agents/string_template_agent.ts","../src/string_agents/json_parser_agent.ts","../src/string_agents/string_case_variants_agent.ts","../src/graph_agents/nested_agent.ts","../src/string_agents/update_text_agent.ts","../src/array_agents/push_agent.ts","../src/array_agents/pop_agent.ts","../src/array_agents/shift_agent.ts","../src/array_agents/array_flat_agent.ts","../src/array_agents/array_join_agent.ts","../src/matrix_agents/dot_product_agent.ts","../src/matrix_agents/sort_by_values_agent.ts","../src/test_agents/echo_agent.ts","../src/test_agents/counting_agent.ts","../src/test_agents/copy_message_agent.ts","../src/test_agents/copy2array_agent.ts","../src/test_agents/merge_node_id_agent.ts","../src/test_agents/stream_mock_agent.ts","../src/graph_agents/map_agent.ts","../src/data_agents/total_agent.ts","../src/data_agents/data_sum_template_agent.ts","../src/data_agents/property_filter_agent.ts","../src/data_agents/copy_agent.ts","../src/service_agents/vanilla_fetch_agent.ts","../src/sleeper_agents/sleeper_agent.ts","../src/compare_agents/compare_agent.ts","../src/images_agents/image_to_message_agent.ts","../src/embedding_agent.ts"],"sourcesContent":["import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent strip one long string into chunks using following parameters\n//\n// chunkSize: number; // default is 2048\n// overlap: number; // default is 1/8th of chunkSize.\n//\n// see example\n// tests/agents/test_string_agent.ts\n//\nconst defaultChunkSize = 2048;\n\nexport const stringSplitterAgent: AgentFunction<\n {\n chunkSize?: number;\n overlap?: number;\n },\n {\n contents: Array;\n count: number;\n chunkSize: number;\n overlap: number;\n },\n {\n text: string;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"stringSplitterAgent: namedInputs is UNDEFINED!\");\n const source = namedInputs.text;\n const chunkSize = params.chunkSize ?? defaultChunkSize;\n const overlap = params.overlap ?? Math.floor(chunkSize / 8);\n const count = Math.floor(source.length / (chunkSize - overlap)) + 1;\n const contents = new Array(count).fill(undefined).map((_, i) => {\n const startIndex = i * (chunkSize - overlap);\n return source.substring(startIndex, startIndex + chunkSize);\n });\n\n return { contents, count, chunkSize, overlap };\n};\n\n// for test and document\nconst sampleInput = {\n text: \"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do.\",\n};\n\nconst sampleParams = { chunkSize: 64 };\nconst sampleResult = {\n contents: [\n \"Here's to the crazy ones, the misfits, the rebels, the troublema\",\n \"roublemakers, the round pegs in the square holes ... the ones wh\",\n \" ones who see things differently -- they're not fond of rules, a\",\n \"rules, and they have no respect for the status quo. ... You can \",\n \"You can quote them, disagree with them, glorify or vilify them, \",\n \"y them, but the only thing you can't do is ignore them because t\",\n \"ecause they change things. ... They push the human race forward,\",\n \"forward, and while some may see them as the crazy ones, we see g\",\n \"we see genius, because the people who are crazy enough to think \",\n \"o think that they can change the world, are the ones who do.\",\n \" do.\",\n ],\n count: 11,\n chunkSize: 64,\n overlap: 8,\n};\n\nconst stringSplitterAgentInfo: AgentFunctionInfo = {\n name: \"stringSplitterAgent\",\n agent: stringSplitterAgent,\n mock: stringSplitterAgent,\n inputs: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"text to be chuncked\",\n },\n },\n required: [\"text\"],\n },\n output: {\n type: \"object\",\n properties: {\n contents: {\n type: \"array\",\n description: \"the array of text chunks\",\n },\n count: {\n type: \"number\",\n description: \"the number of chunks\",\n },\n chunkSize: {\n type: \"number\",\n description: \"the chunk size\",\n },\n overlap: {\n type: \"number\",\n description: \"the overlap size\",\n },\n },\n },\n samples: [\n {\n inputs: sampleInput,\n params: sampleParams,\n result: sampleResult,\n },\n ],\n description: \"This agent strip one long string into chunks using following parameters\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringSplitterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, isObject } from \"graphai\";\n\ntype StringTemplate = string | Record;\ntype StringTemplateObject = StringTemplate | StringTemplate[] | Record;\n\nconst processTemplate: any = (template: StringTemplateObject, match: string, input: string) => {\n if (typeof template === \"string\") {\n if (template === match) {\n return input;\n }\n return template.replace(match, input);\n } else if (Array.isArray(template)) {\n return template.map((item: StringTemplate) => processTemplate(item, match, input));\n }\n\n if (isObject(template)) {\n return Object.keys(template).reduce((tmp: any, key: string) => {\n tmp[key] = processTemplate(template[key], match, input);\n return tmp;\n }, {});\n }\n return template;\n};\n\nexport const stringTemplateAgent: AgentFunction<\n {\n template: StringTemplateObject;\n },\n StringTemplateObject,\n Record\n> = async ({ params, namedInputs }) => {\n if (params.template === undefined) {\n if (namedInputs.text) {\n return namedInputs.text;\n }\n console.warn(\"warning: stringTemplateAgent no template\");\n }\n return Object.keys(namedInputs).reduce((template, key) => {\n return processTemplate(template, \"${\" + key + \"}\", namedInputs[key]);\n }, params.template);\n};\n\nconst sampleNamedInput = { message1: \"hello\", message2: \"test\" };\n\n// for test and document\nconst stringTemplateAgentInfo: AgentFunctionInfo = {\n name: \"stringTemplateAgent\",\n agent: stringTemplateAgent,\n mock: stringTemplateAgent,\n samples: [\n // named\n {\n inputs: sampleNamedInput,\n params: { template: \"${message1}: ${message2}\" },\n result: \"hello: test\",\n },\n {\n inputs: sampleNamedInput,\n params: { template: [\"${message1}: ${message2}\", \"${message2}: ${message1}\"] },\n result: [\"hello: test\", \"test: hello\"],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: \"${message2}\" } },\n result: { apple: \"hello\", lemon: \"test\" },\n },\n {\n inputs: sampleNamedInput,\n params: { template: [{ apple: \"${message1}\", lemon: \"${message2}\" }] },\n result: [{ apple: \"hello\", lemon: \"test\" }],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: [\"${message2}\"] } },\n result: { apple: \"hello\", lemon: [\"test\"] },\n },\n // graphData\n {\n inputs: { agent: \"openAiAgent\", row: \"hello world\", params: { text: \"message\" } },\n params: {\n template: {\n version: 0.5,\n nodes: {\n ai: {\n agent: \"${agent}\",\n isResult: true,\n params: \"${params}\",\n inputs: { prompt: \"${row}\" },\n },\n },\n },\n },\n result: {\n nodes: {\n ai: {\n agent: \"openAiAgent\",\n inputs: {\n prompt: \"hello world\",\n },\n isResult: true,\n params: { text: \"message\" },\n },\n },\n version: 0.5,\n },\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const jsonParserAgent: AgentFunction<\n null,\n unknown,\n {\n text: string;\n data: unknown;\n }\n> = async ({ namedInputs }) => {\n const { text, data } = namedInputs;\n\n if (data) {\n return JSON.stringify(data, null, 2);\n }\n const match = (\"\\n\" + text).match(/\\n```[a-zA-z]*([\\s\\S]*?)\\n```/);\n if (match) {\n return JSON.parse(match[1]);\n }\n return JSON.parse(text);\n};\n\nconst sample_object = { apple: \"red\", lemon: \"yellow\" };\n\nconst json_str = JSON.stringify(sample_object);\nconst md_json1 = [\"```\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json2 = [\"```json\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json3 = [\"```JSON\", json_str, \"```\"].join(\"\\n\");\n\nconst jsonParserAgentInfo: AgentFunctionInfo = {\n name: \"jsonParserAgent\",\n agent: jsonParserAgent,\n mock: jsonParserAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n type: \"string\",\n },\n samples: [\n {\n inputs: { data: sample_object },\n params: {},\n result: JSON.stringify(sample_object, null, 2),\n },\n {\n inputs: { text: JSON.stringify(sample_object, null, 2) },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json1 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json2 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json3 },\n params: {},\n result: sample_object,\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default jsonParserAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const stringCaseVariantsAgent: AgentFunction<\n { suffix?: string },\n { lowerCamelCase: string; snakeCase: string; kebabCase: string; normalized: string },\n { text: string }\n> = async ({ namedInputs, params }) => {\n const { suffix } = params;\n const normalizedArray = namedInputs.text\n .trim()\n .replace(/[\\s-_]+/g, \" \")\n .toLowerCase()\n .split(\" \");\n if (suffix && normalizedArray[normalizedArray.length - 1] !== suffix) {\n normalizedArray.push(suffix);\n }\n const normalized = normalizedArray.join(\" \");\n\n const lowerCamelCase = normalizedArray\n .map((word, index) => {\n if (index === 0) return word;\n return word.charAt(0).toUpperCase() + word.slice(1);\n })\n .join(\"\");\n\n const snakeCase = normalized.replace(/\\s+/g, \"_\");\n const kebabCase = normalized.replace(/\\s+/g, \"-\");\n\n return { lowerCamelCase, snakeCase, kebabCase, normalized };\n};\n\nconst stringCaseVariantsAgentInfo: AgentFunctionInfo = {\n name: \"stringCaseVariantsAgent\",\n agent: stringCaseVariantsAgent,\n mock: stringCaseVariantsAgent,\n samples: [\n {\n inputs: { text: \"this is a pen\" },\n params: {},\n result: {\n kebabCase: \"this-is-a-pen\",\n lowerCamelCase: \"thisIsAPen\",\n normalized: \"this is a pen\",\n snakeCase: \"this_is_a_pen\",\n },\n },\n {\n inputs: { text: \"string case variants\" },\n params: { suffix: \"agent\" },\n result: {\n kebabCase: \"string-case-variants-agent\",\n lowerCamelCase: \"stringCaseVariantsAgent\",\n normalized: \"string case variants agent\",\n snakeCase: \"string_case_variants_agent\",\n },\n },\n ],\n description: \"Format String Cases agent\",\n category: [\"string\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringCaseVariantsAgentInfo;\n","import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, StaticNodeData, GraphData } from \"graphai\";\nimport { GraphAI, assert, graphDataLatestVersion } from \"graphai\";\n\ntype NestedAgentGeneratorOption = {\n resultNodeId: string;\n};\nexport const nestedAgentGenerator: (graphData: GraphData, options?: NestedAgentGeneratorOption) => (context: AgentFunctionContext) => Promise = (\n graphData: GraphData,\n options?: NestedAgentGeneratorOption,\n) => {\n return async (context: AgentFunctionContext) => {\n const { namedInputs, log, debugInfo, params, forNestedGraph } = context;\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n const throwError = params.throwError ?? false;\n if (taskManager) {\n const status = taskManager.getStatus(false);\n assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`);\n }\n assert(!!graphData, \"nestedAgent: graph is required\");\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n if (nodeIds.length > 0) {\n nodeIds.forEach((nodeId) => {\n if (nestedGraphData.nodes[nodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] };\n } else {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n (nestedGraphData.nodes[nodeId] as StaticNodeData)[\"value\"] = namedInputs[nodeId];\n }\n });\n }\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n\n const results = await graphAI.run(false);\n log?.push(...graphAI.transactionLogs());\n\n if (options && options.resultNodeId) {\n return results[options.resultNodeId];\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n };\n};\n\nexport const nestedAgent: AgentFunction<{ throwError?: boolean }> = async (context) => {\n const { forNestedGraph } = context;\n const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } };\n assert(!!graphData, \"No GraphData\");\n\n return await nestedAgentGenerator(graphData)(context);\n};\n\nconst nestedAgentInfo: AgentFunctionInfo = {\n name: \"nestedAgent\",\n agent: nestedAgent,\n mock: nestedAgent,\n samples: [\n {\n inputs: {\n message: \"hello\",\n },\n params: {},\n result: {\n test: [\"hello\"],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"messages\" },\n inputs: { messages: [\":message\"] },\n isResult: true,\n },\n },\n },\n },\n ],\n description: \"nested Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default nestedAgentInfo;\n","import { nestedAgentGenerator } from \"@/generator\";\nimport { graphDataLatestVersion } from \"graphai\";\n\nconst updateTextGraph = {\n version: graphDataLatestVersion,\n nodes: {\n isNewText: {\n if: \":newText\",\n agent: \"copyAgent\",\n inputs: {\n text: \":newText\",\n },\n },\n isOldText: {\n unless: \":newText\",\n agent: \"copyAgent\",\n inputs: {\n text: \":oldText\",\n },\n },\n updatedText: {\n agent: \"copyAgent\",\n anyInput: true,\n inputs: {\n text: [\":isNewText.text\", \":isOldText.text\"],\n },\n },\n resultText: {\n isResult: true,\n agent: \"copyAgent\",\n anyInput: true,\n inputs: {\n text: \":updatedText.text.$0\",\n },\n },\n },\n};\n\nconst updateTextAgent = nestedAgentGenerator(updateTextGraph, { resultNodeId: \"resultText\" });\n\nconst updateTextAgentInfo = {\n name: \"updateTextAgent\",\n agent: updateTextAgent,\n mock: updateTextAgent,\n samples: [\n {\n inputs: { newText: \"new\", oldText: \"old\" },\n params: {},\n result: { text: \"new\" },\n },\n {\n inputs: { newText: \"\", oldText: \"old\" },\n params: {},\n result: { text: \"old\" },\n },\n ],\n description: \"\",\n category: [],\n author: \"\",\n repository: \"\",\n tools: [],\n license: \"\",\n hasGraphData: true,\n};\n\nexport default updateTextAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const pushAgent: AgentFunction }, { array: Array; item?: unknown; items: Array }> = async ({\n namedInputs,\n}) => {\n const extra_message = \" Set inputs: { array: :arrayNodeId, item: :itemNodeId }\";\n arrayValidate(\"pushAgent\", namedInputs, extra_message);\n const { item, items } = namedInputs;\n assert(!!(item || items), \"pushAgent: namedInputs.item is UNDEFINED!\" + extra_message);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n if (item) {\n array.push(item);\n } else {\n items.forEach((item) => {\n array.push(item);\n });\n }\n return {\n array,\n };\n};\n\nconst pushAgentInfo: AgentFunctionInfo = {\n name: \"pushAgent\",\n agent: pushAgent,\n mock: pushAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to push an item to\",\n },\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n items: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2], item: 3 },\n params: {},\n result: { array: [1, 2, 3] },\n },\n {\n inputs: { array: [{ apple: 1 }], item: { lemon: 2 } },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }] },\n },\n {\n inputs: { array: [{ apple: 1 }], items: [{ lemon: 2 }, { banana: 3 }] },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }, { banana: 3 }] },\n },\n ],\n description: \"push Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default pushAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const popAgent: AgentFunction; item: unknown }, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"popAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.pop();\n return { array, item };\n};\n\nconst popAgentInfo: AgentFunctionInfo = {\n name: \"popAgent\",\n agent: popAgent,\n mock: popAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to pop an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item popped from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"a\", \"b\"],\n item: \"c\",\n },\n },\n {\n inputs: {\n array: [1, 2, 3],\n array2: [\"a\", \"b\", \"c\"],\n },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n ],\n description: \"Pop Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default popAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const shiftAgent: AgentFunction, Record, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"shiftAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.shift();\n return { array, item };\n};\n\nconst shiftAgentInfo: AgentFunctionInfo = {\n name: \"shiftAgent\",\n agent: shiftAgent,\n mock: shiftAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to shift an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item shifted from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [2, 3],\n item: 1,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"b\", \"c\"],\n item: \"a\",\n },\n },\n ],\n description: \"shift Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default shiftAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayFlatAgent: AgentFunction<{ depth?: number }, { array: Array }, { array: Array }> = async ({ namedInputs, params }) => {\n arrayValidate(\"arrayFlatAgent\", namedInputs);\n const depth = params.depth ?? 1;\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n return { array: array.flat(depth) };\n};\n\nconst arrayFlatAgentInfo: AgentFunctionInfo = {\n name: \"arrayFlatAgent\",\n agent: arrayFlatAgent,\n mock: arrayFlatAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"flat array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n params: {\n type: \"object\",\n properties: {\n depth: {\n type: \"number\",\n description: \"array depth\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n array: [1, 2, [3]],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: { depth: 2 },\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n array: [\"a\", \"b\", \"c\"],\n },\n },\n ],\n description: \"Array Flat Agent\",\n category: [\"array\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n cacheType: \"pureAgent\",\n license: \"MIT\",\n};\nexport default arrayFlatAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayJoinAgent: AgentFunction<{ separator?: string; flat?: number }, { text: string }, { array: Array }> = async ({\n namedInputs,\n params,\n}) => {\n arrayValidate(\"arrayJoinAgent\", namedInputs);\n const separator = params.separator ?? \"\";\n const { flat } = params;\n\n const text = flat ? namedInputs.array.flat(flat).join(separator) : namedInputs.array.join(separator);\n return { text };\n};\n\nconst arrayJoinAgentInfo: AgentFunctionInfo = {\n name: \"arrayJoinAgent\",\n agent: arrayJoinAgent,\n mock: arrayJoinAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"array join\",\n },\n },\n required: [\"array\"],\n },\n params: {\n type: \"object\",\n properties: {\n separator: {\n type: \"string\",\n description: \"array join separator\",\n },\n flat: {\n type: \"number\",\n description: \"array flat depth\",\n },\n },\n },\n output: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"joined text\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n text: \"abc\",\n },\n },\n //\n {\n inputs: { array: [[1], [2], [3]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 2 },\n result: {\n text: \"1|2|3\",\n },\n },\n ],\n description: \"Array Join Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default arrayJoinAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent calculates the dot product of an array of vectors (A[]) and a vector (B),\n// typically used to calculate cosine similarity of embedding vectors.\n// Inputs:\n// matrix: Two dimentional array of numbers.\n// vector: One dimentional array of numbers.\n// Outputs:\n// { contents: Array } // array of docProduct of each vector (A[]) and vector B\nexport const dotProductAgent: AgentFunction, Array, { matrix: Array>; vector: Array }> = async ({\n namedInputs,\n}) => {\n assert(!!namedInputs, \"dotProductAgent: namedInputs is UNDEFINED!\");\n const matrix = namedInputs.matrix as Array>;\n const vector = namedInputs.vector as Array;\n if (matrix[0].length != vector.length) {\n throw new Error(`dotProduct: Length of vectors do not match. ${matrix[0].length}, ${vector.length}`);\n }\n const contents = matrix.map((vector0) => {\n return vector0.reduce((dotProduct: number, value, index) => {\n return dotProduct + value * vector[index];\n }, 0);\n });\n return contents;\n};\n\nconst dotProductAgentInfo: AgentFunctionInfo = {\n name: \"dotProductAgent\",\n agent: dotProductAgent,\n mock: dotProductAgent,\n inputs: {\n type: \"object\",\n properties: {\n matrix: {\n type: \"array\",\n description: \"two dimentional matrix\",\n items: {\n type: \"array\",\n items: {\n type: \"number\",\n },\n },\n },\n vector: {\n type: \"array\",\n description: \"the vector\",\n items: {\n type: \"number\",\n },\n },\n },\n required: [\"matrix\", \"vector\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n matrix: [\n [1, 2],\n [3, 4],\n [5, 6],\n ],\n vector: [3, 2],\n },\n params: {},\n result: [7, 17, 27],\n },\n {\n inputs: {\n matrix: [\n [1, 2],\n [2, 3],\n ],\n vector: [1, 2],\n },\n params: {},\n result: [5, 8],\n },\n ],\n description: \"dotProduct Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dotProductAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent returned a sorted array of one array (A) based on another array (B).\n// The default sorting order is \"decendant\".\n//\n// Parameters:\n// acendant: Specifies if the sorting order should be acendant. The default is \"false\" (decendant).\n// Inputs:\n// array: Array; // array to be sorted\n// values: Array; // array of numbers for sorting\n//\nexport const sortByValuesAgent: AgentFunction<\n {\n assendant?: boolean;\n },\n Array,\n {\n array: Array;\n values: Array;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"sortByValue: namedInputs is UNDEFINED!\");\n assert(!!namedInputs.array, \"sortByValue: namedInputs.array is UNDEFINED!\");\n assert(!!namedInputs.values, \"sortByValue: namedInputs.values is UNDEFINED!\");\n\n const direction = (params?.assendant ?? false) ? -1 : 1;\n const array: Array = namedInputs.array;\n const values: Array = namedInputs.values;\n const joined = array.map((item, index) => {\n return { item, value: values[index] };\n });\n const contents = joined\n .sort((a, b) => {\n return (b.value - a.value) * direction;\n })\n .map((a) => {\n return a.item;\n });\n return contents;\n};\n\nconst sortByValuesAgentInfo: AgentFunctionInfo = {\n name: \"sortByValuesAgent\",\n agent: sortByValuesAgent,\n mock: sortByValuesAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to sort\",\n },\n values: {\n type: \"array\",\n description: \"values associated with items in the array\",\n },\n },\n required: [\"array\", \"values\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {},\n result: [\"lemon\", \"orange\", \"apple\", \"banana\"],\n },\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {\n assendant: true,\n },\n result: [\"banana\", \"apple\", \"orange\", \"lemon\"],\n },\n ],\n description: \"sortByValues Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sortByValuesAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const echoAgent: AgentFunction = async ({ params, filterParams }) => {\n if (params.filterParams) {\n return filterParams;\n }\n return params;\n};\n\n// for test and document\nconst echoAgentInfo: AgentFunctionInfo = {\n name: \"echoAgent\",\n agent: echoAgent,\n mock: echoAgent,\n samples: [\n {\n inputs: {},\n params: { text: \"this is test\" },\n result: { text: \"this is test\" },\n },\n {\n inputs: {},\n params: {\n text: \"If you add filterParams option, it will respond to filterParams\",\n filterParams: true,\n },\n result: {},\n },\n ],\n description: \"Echo agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default echoAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const countingAgent: AgentFunction<{ count: number }, { list: number[] }> = async ({ params }) => {\n return {\n list: new Array(params.count).fill(undefined).map((_, i) => {\n return i;\n }),\n };\n};\n\n// for test and document\nconst countingAgentInfo: AgentFunctionInfo = {\n name: \"countingAgent\",\n agent: countingAgent,\n mock: countingAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4 },\n result: { list: [0, 1, 2, 3] },\n },\n ],\n description: \"Counting agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default countingAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const copyMessageAgent: AgentFunction<{ count: number; message: string }, { messages: string[] }> = async ({ params }) => {\n return {\n messages: new Array(params.count).fill(undefined).map(() => {\n return params.message;\n }),\n };\n};\n\n// for test and document\nconst copyMessageAgentInfo: AgentFunctionInfo = {\n name: \"copyMessageAgent\",\n agent: copyMessageAgent,\n mock: copyMessageAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4, message: \"hello\" },\n result: { messages: [\"hello\", \"hello\", \"hello\", \"hello\"] },\n },\n ],\n description: \"CopyMessage agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copyMessageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copy2ArrayAgent: AgentFunction<{ count: number }> = async ({ namedInputs, params }) => {\n assert(isNamedInputs(namedInputs), \"copy2ArrayAgent: namedInputs is UNDEFINED!\");\n const input = namedInputs.item ? namedInputs.item : namedInputs;\n return new Array(params.count).fill(undefined).map(() => {\n return input;\n });\n};\n\n// for test and document\nconst copy2ArrayAgentInfo: AgentFunctionInfo = {\n name: \"copy2ArrayAgent\",\n agent: copy2ArrayAgent,\n mock: copy2ArrayAgent,\n samples: [\n {\n inputs: { item: { message: \"hello\" } },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { message: \"hello\" },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { item: \"hello\" },\n params: { count: 10 },\n result: [\"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\"],\n },\n ],\n description: \"Copy2Array agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copy2ArrayAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const mergeNodeIdAgent: AgentFunction, { array: Record[] }> = async ({\n debugInfo: { nodeId },\n namedInputs,\n}) => {\n arrayValidate(\"mergeNodeIdAgent\", namedInputs);\n\n const dataSet = namedInputs.array;\n\n return dataSet.reduce(\n (tmp, input) => {\n return { ...tmp, ...input };\n },\n { [nodeId]: \"hello\" },\n );\n};\n\n// for test and document\nconst mergeNodeIdAgentInfo: AgentFunctionInfo = {\n name: \"mergeNodeIdAgent\",\n agent: mergeNodeIdAgent,\n mock: mergeNodeIdAgent,\n samples: [\n {\n inputs: { array: [{ message: \"hello\" }] },\n params: {},\n result: {\n message: \"hello\",\n test: \"hello\",\n },\n },\n ],\n description: \"merge node id agent\",\n category: [\"test\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default mergeNodeIdAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const streamMockAgent: AgentFunction = async ({ params, filterParams, namedInputs }) => {\n const message = params.message ?? namedInputs.message ?? \"\";\n\n for await (const token of message.split(\"\")) {\n if (filterParams.streamTokenCallback) {\n filterParams.streamTokenCallback(token);\n }\n await sleep(params.sleep || 100);\n }\n\n return { message };\n};\n\n// for test and document\nconst streamMockAgentInfo: AgentFunctionInfo = {\n name: \"streamMockAgent\",\n agent: streamMockAgent,\n mock: streamMockAgent,\n inputs: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n message: {\n type: \"string\",\n description: \"streaming message\",\n },\n },\n },\n {\n type: \"array\",\n },\n ],\n },\n samples: [\n {\n inputs: {},\n params: { message: \"this is params test\" },\n result: { message: \"this is params test\" },\n },\n {\n inputs: { message: \"this is named inputs test\" },\n params: {},\n result: { message: \"this is named inputs test\" },\n },\n ],\n description: \"Stream mock agent\",\n category: [\"test\"],\n author: \"Isamu Arimoto\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n stream: true,\n};\n\nexport default streamMockAgentInfo;\n","import { GraphAI, AgentFunction, AgentFunctionInfo, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const mapAgent: AgentFunction<\n {\n limit?: number;\n resultAll?: boolean;\n compositeResult?: boolean;\n throwError?: boolean;\n },\n Record\n> = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => {\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n\n if (taskManager) {\n const status = taskManager.getStatus();\n assert(status.concurrency > status.running, `mapAgent: Concurrency is too low: ${status.concurrency}`);\n }\n\n assert(!!namedInputs.rows, \"mapAgent: rows property is required in namedInput\");\n assert(!!graphData, \"mapAgent: graph is required\");\n\n const rows = namedInputs.rows.map((item: any) => item);\n if (params.limit && params.limit < rows.length) {\n rows.length = params.limit; // trim\n }\n const resultAll = params.resultAll ?? false;\n const throwError = params.throwError ?? false;\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n nestedGraphData.nodes[\"__mapIndex\"] = {};\n nodeIds.forEach((nodeId) => {\n const mappedNodeId = nodeId === \"rows\" ? \"row\" : nodeId;\n if (nestedGraphData.nodes[mappedNodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[mappedNodeId] = { value: namedInputs[nodeId] };\n } else if (!(\"agent\" in nestedGraphData.nodes[mappedNodeId])) {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n nestedGraphData.nodes[mappedNodeId][\"value\"] = namedInputs[nodeId];\n }\n });\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphs: Array = rows.map((row: any, index: number) => {\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n graphAI.injectValue(\"row\", row, \"__mapAgent_inputs__\");\n graphAI.injectValue(\"__mapIndex\", index, \"__mapAgent_inputs__\");\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n return graphAI;\n });\n\n const runs = graphs.map((graph) => {\n return graph.run(resultAll);\n });\n const results = await Promise.all(runs);\n const nodeIds = Object.keys(results[0]);\n // assert(nodeIds.length > 0, \"mapAgent: no return values (missing isResult)\");\n\n if (log) {\n const logs = graphs.map((graph, index) => {\n return graph.transactionLogs().map((log) => {\n log.mapIndex = index;\n return log;\n });\n });\n log.push(...logs.flat());\n }\n\n if (params.compositeResult) {\n const compositeResult = nodeIds.reduce((tmp: Record>, nodeId) => {\n tmp[nodeId] = results.map((result) => {\n return result[nodeId];\n });\n return tmp;\n }, {});\n return compositeResult;\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n};\n\nconst mapAgentInfo: AgentFunctionInfo = {\n name: \"mapAgent\",\n agent: mapAgent,\n mock: mapAgent,\n samples: [\n {\n inputs: {\n rows: [1, 2],\n },\n params: {},\n result: [{ test: [1] }, { test: [2] }],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${word}.\",\n },\n inputs: { word: \":row\" },\n isResult: true,\n },\n },\n },\n result: [\n { node2: \"I love apple.\" },\n { node2: \"I love orange.\" },\n { node2: \"I love banana.\" },\n { node2: \"I love lemon.\" },\n { node2: \"I love melon.\" },\n { node2: \"I love pineapple.\" },\n { node2: \"I love tomato.\" },\n ],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${item}.\",\n },\n inputs: { item: \":row.fruit\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"I love apple.\" }, { node2: \"I love orange.\" }],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n name: \"You\",\n verb: \"like\",\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"${name} ${verb} ${fruit}.\",\n },\n inputs: { fruit: \":row.fruit\", name: \":name\", verb: \":verb\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"You like apple.\" }, { node2: \"You like orange.\" }],\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n test: [1],\n row: 1,\n },\n {\n __mapIndex: 1,\n test: [2],\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n map: [\n {\n test: 1,\n },\n {\n test: 1,\n },\n ],\n row: 1,\n test: 1,\n },\n {\n __mapIndex: 1,\n map: [\n {\n test: 2,\n },\n {\n test: 2,\n },\n ],\n test: 2,\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n },\n },\n },\n },\n },\n },\n\n // old response\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${row}.\",\n },\n inputs: { row: \":row\" },\n isResult: true,\n },\n },\n },\n result: {\n node2: [\"I love apple.\", \"I love orange.\", \"I love banana.\", \"I love lemon.\", \"I love melon.\", \"I love pineapple.\", \"I love tomato.\"],\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n __mapIndex: [0, 1],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n __mapIndex: [0, 1],\n test: [[1], [2]],\n map: [\n {\n test: [[[1]], [[1]]],\n },\n {\n test: [[[2]], [[2]]],\n },\n ],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n },\n },\n },\n ],\n description: \"Map Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default mapAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const totalAgent: AgentFunction, Record, { array: Record[] }> = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((result, input) => {\n const inputArray = Array.isArray(input) ? input : [input];\n inputArray.forEach((innerInput) => {\n Object.keys(innerInput).forEach((key) => {\n const value = innerInput[key];\n if (result[key]) {\n result[key] += value;\n } else {\n result[key] = value;\n }\n });\n });\n return result;\n }, {});\n};\n\n//\nconst totalAgentInfo: AgentFunctionInfo = {\n name: \"totalAgent\",\n agent: totalAgent,\n mock: totalAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: { array: [[{ a: 1, b: -1 }, { c: 10 }], [{ a: 2, b: -1 }], [{ a: 3, b: -2 }, { d: -10 }]] },\n params: {},\n result: { a: 6, b: -4, c: 10, d: -10 },\n },\n {\n inputs: { array: [{ a: 1 }] },\n params: {},\n result: { a: 1 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }] },\n params: {},\n result: { a: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: {\n array: [\n { a: 1, b: 1 },\n { a: 2, b: 2 },\n { a: 3, b: 0 },\n ],\n },\n params: {},\n result: { a: 6, b: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2, b: 2 }, { a: 3, b: 0 }] },\n params: {},\n result: { a: 6, b: 2 },\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default totalAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const dataSumTemplateAgent: AgentFunction = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((tmp, input) => {\n return tmp + input;\n }, 0);\n};\n\nconst dataSumTemplateAgentInfo: AgentFunctionInfo = {\n name: \"dataSumTemplateAgent\",\n agent: dataSumTemplateAgent,\n mock: dataSumTemplateAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of numbers to calculate the sum of\",\n items: {\n type: \"integer\",\n },\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"number\",\n },\n samples: [\n {\n inputs: { array: [1] },\n params: {},\n result: 1,\n },\n {\n inputs: { array: [1, 2] },\n params: {},\n result: 3,\n },\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: 6,\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dataSumTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nconst applyFilter = (\n object: any,\n index: number,\n arrayInputs: any,\n include: Array | undefined,\n exclude: Array | undefined,\n alter: Record> | undefined,\n inject: Array> | undefined,\n swap: Record | undefined,\n inspect: Array> | undefined,\n) => {\n const propIds = include ? include : Object.keys(object);\n const excludeSet = new Set(exclude ?? []);\n const result = propIds.reduce((tmp: Record, propId) => {\n if (!excludeSet.has(propId)) {\n const mapping = alter && alter[propId];\n if (mapping && mapping[object[propId]]) {\n tmp[propId] = mapping[object[propId]];\n } else {\n tmp[propId] = object[propId];\n }\n }\n return tmp;\n }, {});\n\n if (inject) {\n inject.forEach((item) => {\n if (item.index === undefined || item.index === index) {\n result[item.propId] = arrayInputs[item.from];\n }\n });\n }\n if (inspect) {\n inspect.forEach((item) => {\n const value = arrayInputs[item.from ?? 1]; // default is arrayInputs[1]\n if (item.equal) {\n result[item.propId] = item.equal === value;\n } else if (item.notEqual) {\n result[item.propId] = item.notEqual !== value;\n }\n });\n }\n if (swap) {\n Object.keys(swap).forEach((key) => {\n const tmp = result[key];\n result[key] = result[swap[key]];\n result[swap[key]] = tmp;\n });\n }\n return result;\n};\n\nexport const propertyFilterAgent: AgentFunction<{\n include?: Array;\n exclude?: Array;\n alter?: Record>;\n inject?: Array>;\n inspect?: Array>;\n swap?: Record;\n}> = async ({ namedInputs, params }) => {\n const { include, exclude, alter, inject, swap, inspect } = params;\n const { array, item } = namedInputs;\n if (array) {\n // This is advanced usage, including \"inject\" and \"inspect\", which uses\n // array[1], array[2], ...\n const [target] = array; // Extract the first one\n if (Array.isArray(target)) {\n return target.map((item, index) => applyFilter(item, index, array, include, exclude, alter, inject, swap, inspect));\n }\n return applyFilter(target, 0, array, include, exclude, alter, inject, swap, inspect);\n } else if (item) {\n return applyFilter(item, 0, [], include, exclude, alter, inject, swap, inspect);\n }\n return false;\n};\n\nconst testInputs = {\n array: [\n [\n { color: \"red\", model: \"Model 3\", type: \"EV\", maker: \"Tesla\", range: 300 },\n { color: \"blue\", model: \"Model Y\", type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n \"Tesla Motors\",\n ],\n};\n\nconst propertyFilterAgentInfo: AgentFunctionInfo = {\n name: \"propertyFilterAgent\",\n agent: propertyFilterAgent,\n mock: propertyFilterAgent,\n inputs: {\n type: \"object\",\n },\n output: {\n type: \"any\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to apply filter\",\n },\n item: {\n type: \"object\",\n description: \"the object to apply filter\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [testInputs.array[0][0]] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: testInputs,\n params: { include: [\"color\", \"model\"] },\n result: [\n { color: \"red\", model: \"Model 3\" },\n { color: \"blue\", model: \"Model Y\" },\n ],\n },\n {\n inputs: testInputs,\n params: { exclude: [\"color\", \"model\"] },\n result: [\n { type: \"EV\", maker: \"Tesla\", range: 300 },\n { type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { exclude: [\"color\", \"model\"] },\n result: { type: \"EV\", maker: \"Tesla\", range: 300 },\n },\n {\n inputs: testInputs,\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: [\n {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n {\n color: \"red\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { swap: { maker: \"model\" } },\n result: [\n {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model Y\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { swap: { maker: \"model\" } },\n result: {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1, index: 0 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: {\n inspect: [\n { propId: \"isTesla\", equal: \"Tesla Motors\" }, // from: 1 is implied\n { propId: \"isGM\", notEqual: \"Tesla Motors\", from: 1 },\n ],\n },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n isTesla: true,\n isGM: false,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n isTesla: true,\n isGM: false,\n },\n ],\n },\n ],\n description: \"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default propertyFilterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copyAgent: AgentFunction<{\n namedKey?: string;\n}> = async ({ namedInputs, params }) => {\n const { namedKey } = params;\n assert(isNamedInputs(namedInputs), \"copyAgent: namedInputs is UNDEFINED!\");\n if (namedKey) {\n return namedInputs[namedKey];\n }\n return namedInputs;\n};\n\nconst copyAgentInfo: AgentFunctionInfo = {\n name: \"copyAgent\",\n agent: copyAgent,\n mock: copyAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n samples: [\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: {},\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { array: [\"Hello World\", \"Discarded\"] },\n params: {},\n result: { array: [\"Hello World\", \"Discarded\"] },\n },\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: { namedKey: \"color\" },\n result: \"red\",\n },\n ],\n description: \"Returns namedInputs\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default copyAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const vanillaFetchAgent: AgentFunction<{ debug?: boolean; type?: string; throwError?: boolean }, any, any> = async ({ namedInputs, params }) => {\n const { url, method, queryParams, headers, body } = namedInputs;\n const throwError = params.throwError ?? false;\n\n const url0 = new URL(url);\n const headers0 = headers ? { ...headers } : {};\n\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n url0.search = params.toString();\n }\n\n if (body) {\n headers0[\"Content-Type\"] = \"application/json\";\n }\n\n const fetchOptions: RequestInit = {\n method: (method ?? body) ? \"POST\" : \"GET\",\n headers: new Headers(headers0),\n body: body ? JSON.stringify(body) : undefined,\n };\n\n if (params?.debug) {\n return {\n url: url0.toString(),\n method: fetchOptions.method,\n headers: headers0,\n body: fetchOptions.body,\n };\n }\n\n const response = await fetch(url0.toString(), fetchOptions);\n\n if (!response.ok) {\n const status = response.status;\n const type = params?.type ?? \"json\";\n const error = type === \"json\" ? await response.json() : await response.text();\n if (throwError) {\n throw new Error(`HTTP error: ${status}`);\n }\n return {\n onError: {\n message: `HTTP error: ${status}`,\n status,\n error,\n },\n };\n }\n\n const result = await (async () => {\n const type = params?.type ?? \"json\";\n if (type === \"json\") {\n return await response.json();\n } else if (type === \"text\") {\n return response.text();\n }\n throw new Error(`Unknown Type! ${type}`);\n })();\n\n return result;\n};\n\nconst vanillaFetchAgentInfo: AgentFunctionInfo = {\n name: \"vanillaFetchAgent\",\n agent: vanillaFetchAgent,\n mock: vanillaFetchAgent,\n inputs: {\n type: \"object\",\n properties: {\n url: {\n type: \"string\",\n description: \"baseurl\",\n },\n method: {\n type: \"string\",\n description: \"HTTP method\",\n },\n headers: {\n type: \"object\",\n description: \"HTTP headers\",\n },\n quaryParams: {\n type: \"object\",\n description: \"Query parameters\",\n },\n body: {\n anyOf: [{ type: \"string\" }, { type: \"object\" }],\n description: \"body\",\n },\n },\n required: [\"url\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: { url: \"https://www.google.com\", queryParams: { foo: \"bar\" }, headers: { \"x-myHeader\": \"secret\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"GET\",\n url: \"https://www.google.com/?foo=bar\",\n headers: {\n \"x-myHeader\": \"secret\",\n },\n body: undefined,\n },\n },\n {\n inputs: { url: \"https://www.google.com\", body: { foo: \"bar\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"POST\",\n url: \"https://www.google.com/\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ foo: \"bar\" }),\n },\n },\n ],\n description: \"Retrieves JSON data from the specified URL\",\n category: [\"service\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default vanillaFetchAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const sleeperAgent: AgentFunction<{ duration?: number }> = async ({ params, namedInputs }) => {\n await sleep(params?.duration ?? 10);\n return namedInputs;\n};\n\nconst sleeperAgentInfo: AgentFunctionInfo = {\n name: \"sleeperAgent\",\n agent: sleeperAgent,\n mock: sleeperAgent,\n samples: [\n {\n inputs: {},\n params: { duration: 1 },\n result: {},\n },\n {\n inputs: { array: [{ a: 1 }, { b: 2 }] },\n params: { duration: 1 },\n result: {\n array: [{ a: 1 }, { b: 2 }],\n },\n },\n ],\n description: \"sleeper Agent\",\n category: [\"sleeper\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sleeperAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\ntype CompareDataItem = string | number | boolean | CompareData;\ntype CompareData = CompareDataItem[];\n\nconst compare = (_array: CompareData): boolean => {\n if (_array.length !== 3) {\n throw new Error(`compare inputs length must must be 3`);\n }\n const array = _array.map((value) => {\n if (Array.isArray(value)) {\n return compare(value);\n }\n return value;\n });\n const [a, operator, b] = array;\n if (operator === \"==\") {\n return a === b;\n }\n if (operator === \"!=\") {\n return a !== b;\n }\n if (operator === \">\") {\n return Number(a) > Number(b);\n }\n if (operator === \">=\") {\n return Number(a) >= Number(b);\n }\n if (operator === \"<\") {\n return Number(a) < Number(b);\n }\n if (operator === \"<=\") {\n return Number(a) <= Number(b);\n }\n if (operator === \"||\") {\n return !!a || !!b;\n }\n if (operator === \"&&\") {\n return !!a && !!b;\n }\n if (operator === \"XOR\") {\n return !!a === !b;\n }\n throw new Error(`unknown compare operator`);\n};\n\nexport const compareAgent: AgentFunction = async ({ namedInputs, params }) => {\n const ret = compare(namedInputs.array);\n if (params?.value) {\n return params?.value[ret ? \"true\" : \"false\"] ?? ret;\n }\n return ret;\n};\n\nconst compareAgentInfo: AgentFunctionInfo = {\n name: \"compareAgent\",\n agent: compareAgent,\n mock: compareAgent,\n inputs: {},\n output: {},\n samples: [\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"a\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abca\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"b\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abcd\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abc\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abcd\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"15\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">\", 15] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \">=\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 10\n inputs: { array: [\"10\", \">=\", \"19\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">=\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 19] },\n params: {},\n result: false,\n },\n //\n\n {\n inputs: { array: [\"10\", \"<\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<\", \"15\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<\", 15] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 20\n inputs: { array: [\"10\", \"<=\", \"19\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 19] },\n params: {},\n result: true,\n },\n\n {\n inputs: { array: [true, \"||\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"||\", false] },\n params: {},\n result: false,\n },\n\n {\n inputs: { array: [true, \"&&\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"&&\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [true, \"XOR\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"XOR\", true] },\n params: {},\n result: false,\n },\n //\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"||\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [[[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"bbb\", \"==\", \"bbb\"]], \"||\", [\"aaa\", \"&&\", \"bbb\"]] },\n params: {},\n result: true,\n },\n ],\n description: \"compare\",\n category: [\"compare\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default compareAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\n// https://platform.openai.com/docs/guides/vision\nconst getImageUrl = (data: string, imageType: string, detail?: string) => {\n if (imageType === \"http\") {\n return {\n url: data,\n };\n }\n const dataUrl = `data:image/${imageType};base64,${data}`;\n return {\n url: dataUrl,\n detail: detail ?? \"auto\",\n };\n};\n\ntype Content = { type: string; image_url: { url: string; detail?: string } } | { type: string; text: string };\n\nexport const images2messageAgent: AgentFunction<\n {\n imageType: string;\n detail?: string;\n },\n {\n message: {\n role: \"user\";\n content: Content[];\n };\n },\n {\n array: string[];\n prompt?: string;\n }\n> = async ({ namedInputs, params }) => {\n const { imageType, detail } = params;\n const { array, prompt } = namedInputs;\n arrayValidate(\"images2messageAgent\", namedInputs);\n assert(!!imageType, \"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...\");\n\n const contents: Content[] = array.map((base64ImageData) => {\n const image_url = getImageUrl(base64ImageData, imageType, detail);\n return {\n type: \"image_url\",\n image_url,\n };\n });\n\n if (prompt) {\n contents.unshift({ type: \"text\", text: prompt });\n }\n\n return {\n message: {\n role: \"user\",\n content: contents,\n },\n };\n};\n\nconst images2messageAgentInfo: AgentFunctionInfo = {\n name: \"images2messageAgent\",\n agent: images2messageAgent,\n mock: images2messageAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of base64 image data\",\n },\n prompt: {\n type: \"string\",\n description: \"prompt message\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [\"abcabc\", \"122123\"] },\n params: { imageType: \"png\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"abcabc\", \"122123\"], prompt: \"hello\" },\n params: { imageType: \"jpg\", detail: \"high\" },\n result: {\n message: {\n content: [\n {\n type: \"text\",\n text: \"hello\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"http://example.com/1.jpg\", \"http://example.com/2.jpg\"] },\n params: { imageType: \"http\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n url: \"http://example.com/1.jpg\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n url: \"http://example.com/2.jpg\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n ],\n description: \"Returns the message data for llm include image\",\n category: [\"image\"],\n author: \"Receptron team\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default images2messageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\n// Type for OpenAI's Embedding API\ninterface EmbeddingResponse {\n object: string;\n model: string;\n usage: {\n prompt_tokens: number;\n total_tokens: number;\n };\n data: [\n {\n object: string;\n index: number;\n embedding: number[];\n },\n ];\n}\n\nconst defaultEmbeddingModel = \"text-embedding-3-small\";\nconst OpenAI_embedding_API = \"https://api.openai.com/v1/embeddings\";\n\n// This agent retrieves embedding vectors for an array of strings using OpenAI's API\n//\n// Parameters:\n// model: Specifies the model (default is \"text-embedding-3-small\")\n// NamedInputs:\n// array: Array\n// item: string,\n// Result:\n// contents: Array>\n//\nexport const stringEmbeddingsAgent: AgentFunction<\n {\n model?: string;\n },\n number[][],\n { array: Array; item: string }\n> = async ({ params, namedInputs }) => {\n const { array, item } = namedInputs;\n\n const sources = array ?? [item];\n const apiKey = process.env.OPENAI_API_KEY;\n if (!apiKey) {\n throw new Error(\"OPENAI_API_KEY key is not set in environment variables.\");\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${apiKey}`,\n };\n\n const response = await fetch(OpenAI_embedding_API, {\n method: \"POST\",\n headers: headers,\n body: JSON.stringify({\n input: sources,\n model: params?.model ?? defaultEmbeddingModel,\n }),\n });\n const jsonResponse: EmbeddingResponse = await response.json();\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const embeddings = jsonResponse.data.map((object) => {\n return object.embedding;\n });\n return embeddings;\n};\n\nconst stringEmbeddingsAgentInfo: AgentFunctionInfo = {\n name: \"stringEmbeddingsAgent\",\n agent: stringEmbeddingsAgent,\n mock: stringEmbeddingsAgent,\n samples: [],\n description: \"Embeddings Agent\",\n category: [\"embedding\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringEmbeddingsAgentInfo;\n"],"names":["assert","isObject","graphDataLatestVersion","GraphAI","arrayValidate","isNamedInputs","sleep"],"mappings":";;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,IAAI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AM,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAI;QAClD,OAAO,MAAM,CAAC,SAAS;AACzB,KAAC,CAAC;AACF,IAAA,OAAO,UAAU;AACnB,CAAC;AAED,MAAM,yBAAyB,GAAsB;AACnD,IAAA,IAAI,EAAE,uBAAuB;AAC7B,IAAA,KAAK,EAAE,qBAAqB;AAC5B,IAAA,IAAI,EAAE,qBAAqB;AAC3B,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,WAAW,EAAE,kBAAkB;IAC/B,QAAQ,EAAE,CAAC,WAAW,CAAC;AACvB,IAAA,MAAM,EAAE,gBAAgB;AACxB,IAAA,UAAU,EAAE,sCAAsC;AAClD,IAAA,OAAO,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/agents/vanilla_agents/lib/bundle.cjs.min.js b/agents/vanilla_agents/lib/bundle.cjs.min.js index 32ce1686..ba1160b1 100644 --- a/agents/vanilla_agents/lib/bundle.cjs.min.js +++ b/agents/vanilla_agents/lib/bundle.cjs.min.js @@ -1,2 +1,2 @@ -"use strict";var e=require("graphai"),a=require("@graphai/agent_utils");const t=async({params:a,namedInputs:t})=>{e.assert(!!t,"stringSplitterAgent: namedInputs is UNDEFINED!");const r=t.text,s=a.chunkSize??2048,n=a.overlap??Math.floor(s/8),o=Math.floor(r.length/(s-n))+1;return{contents:new Array(o).fill(void 0).map(((e,a)=>{const t=a*(s-n);return r.substring(t,t+s)})),count:o,chunkSize:s,overlap:n}},r={name:"stringSplitterAgent",agent:t,mock:t,inputs:{type:"object",properties:{text:{type:"string",description:"text to be chuncked"}},required:["text"]},output:{type:"object",properties:{contents:{type:"array",description:"the array of text chunks"},count:{type:"number",description:"the number of chunks"},chunkSize:{type:"number",description:"the chunk size"},overlap:{type:"number",description:"the overlap size"}}},samples:[{inputs:{text:"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do."},params:{chunkSize:64},result:{contents:["Here's to the crazy ones, the misfits, the rebels, the troublema","roublemakers, the round pegs in the square holes ... the ones wh"," ones who see things differently -- they're not fond of rules, a","rules, and they have no respect for the status quo. ... You can ","You can quote them, disagree with them, glorify or vilify them, ","y them, but the only thing you can't do is ignore them because t","ecause they change things. ... They push the human race forward,","forward, and while some may see them as the crazy ones, we see g","we see genius, because the people who are crazy enough to think ","o think that they can change the world, are the ones who do."," do."],count:11,chunkSize:64,overlap:8}}],description:"This agent strip one long string into chunks using following parameters",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},s=(a,t,r)=>"string"==typeof a?a===t?r:a.replace(t,r):Array.isArray(a)?a.map((e=>s(e,t,r))):e.isObject(a)?Object.keys(a).reduce(((e,n)=>(e[n]=s(a[n],t,r),e)),{}):a,n=async({params:e,namedInputs:a})=>{if(void 0===e.template){if(a.text)return a.text;console.warn("warning: stringTemplateAgent no template")}return Object.keys(a).reduce(((e,t)=>s(e,"${"+t+"}",a[t])),e.template)},o={message1:"hello",message2:"test"},p={name:"stringTemplateAgent",agent:n,mock:n,samples:[{inputs:o,params:{template:"${message1}: ${message2}"},result:"hello: test"},{inputs:o,params:{template:["${message1}: ${message2}","${message2}: ${message1}"]},result:["hello: test","test: hello"]},{inputs:o,params:{template:{apple:"${message1}",lemon:"${message2}"}},result:{apple:"hello",lemon:"test"}},{inputs:o,params:{template:[{apple:"${message1}",lemon:"${message2}"}]},result:[{apple:"hello",lemon:"test"}]},{inputs:o,params:{template:{apple:"${message1}",lemon:["${message2}"]}},result:{apple:"hello",lemon:["test"]}},{inputs:{agent:"openAiAgent",row:"hello world",params:{text:"message"}},params:{template:{version:.5,nodes:{ai:{agent:"${agent}",isResult:!0,params:"${params}",inputs:{prompt:"${row}"}}}}},result:{nodes:{ai:{agent:"openAiAgent",inputs:{prompt:"hello world"},isResult:!0,params:{text:"message"}}},version:.5}}],description:"Template agent",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},i=async({namedInputs:e})=>{const{text:a,data:t}=e;if(t)return JSON.stringify(t,null,2);const r=("\n"+a).match(/\n```[a-zA-z]*([\s\S]*?)\n```/);return r?JSON.parse(r[1]):JSON.parse(a)},m={apple:"red",lemon:"yellow"},l=JSON.stringify(m),u=["```",l,"```"].join("\n"),c=["```json",l,"```"].join("\n"),g=["```JSON",l,"```"].join("\n"),y={name:"jsonParserAgent",agent:i,mock:i,inputs:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},output:{type:"string"},samples:[{inputs:{data:m},params:{},result:JSON.stringify(m,null,2)},{inputs:{text:JSON.stringify(m,null,2)},params:{},result:m},{inputs:{text:u},params:{},result:m},{inputs:{text:c},params:{},result:m},{inputs:{text:g},params:{},result:m}],description:"Template agent",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},d=async({namedInputs:e,params:a})=>{const{suffix:t}=a,r=e.text.trim().replace(/[\s-_]+/g," ").toLowerCase().split(" ");t&&r[r.length-1]!==t&&r.push(t);const s=r.join(" ");return{lowerCamelCase:r.map(((e,a)=>0===a?e:e.charAt(0).toUpperCase()+e.slice(1))).join(""),snakeCase:s.replace(/\s+/g,"_"),kebabCase:s.replace(/\s+/g,"-"),normalized:s}},h={name:"stringCaseVariantsAgent",agent:d,mock:d,samples:[{inputs:{text:"this is a pen"},params:{},result:{kebabCase:"this-is-a-pen",lowerCamelCase:"thisIsAPen",normalized:"this is a pen",snakeCase:"this_is_a_pen"}},{inputs:{text:"string case variants"},params:{suffix:"agent"},result:{kebabCase:"string-case-variants-agent",lowerCamelCase:"stringCaseVariantsAgent",normalized:"string case variants agent",snakeCase:"string_case_variants_agent"}}],description:"Format String Cases agent",category:["string"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},b=async({namedInputs:t})=>{const r=" Set inputs: { array: :arrayNodeId, item: :itemNodeId }";a.arrayValidate("pushAgent",t,r);const{item:s,items:n}=t;e.assert(!(!s&&!n),"pushAgent: namedInputs.item is UNDEFINED!"+r);const o=t.array.map((e=>e));return s?o.push(s):n.forEach((e=>{o.push(e)})),{array:o}},f={name:"pushAgent",agent:b,mock:b,inputs:{type:"object",properties:{array:{type:"array",description:"the array to push an item to"},item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item push into the array"},items:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item push into the array"}},required:["array"]},output:{type:"object",properties:{array:{type:"array"}}},samples:[{inputs:{array:[1,2],item:3},params:{},result:{array:[1,2,3]}},{inputs:{array:[{apple:1}],item:{lemon:2}},params:{},result:{array:[{apple:1},{lemon:2}]}},{inputs:{array:[{apple:1}],items:[{lemon:2},{banana:3}]},params:{},result:{array:[{apple:1},{lemon:2},{banana:3}]}}],description:"push Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},A=async({namedInputs:e})=>{a.arrayValidate("popAgent",e);const t=e.array.map((e=>e)),r=t.pop();return{array:t,item:r}},w={name:"popAgent",agent:A,mock:A,inputs:{type:"object",properties:{array:{type:"array",description:"the array to pop an item from"}},required:["array"]},output:{type:"object",properties:{item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item popped from the array"},array:{type:"array",description:"the remaining array"}}},samples:[{inputs:{array:[1,2,3]},params:{},result:{array:[1,2],item:3}},{inputs:{array:["a","b","c"]},params:{},result:{array:["a","b"],item:"c"}},{inputs:{array:[1,2,3],array2:["a","b","c"]},params:{},result:{array:[1,2],item:3}}],description:"Pop Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},I=async({namedInputs:e})=>{a.arrayValidate("shiftAgent",e);const t=e.array.map((e=>e)),r=t.shift();return{array:t,item:r}},k={name:"shiftAgent",agent:I,mock:I,inputs:{type:"object",properties:{array:{type:"array",description:"the array to shift an item from"}},required:["array"]},output:{type:"object",properties:{item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item shifted from the array"},array:{type:"array",description:"the remaining array"}}},samples:[{inputs:{array:[1,2,3]},params:{},result:{array:[2,3],item:1}},{inputs:{array:["a","b","c"]},params:{},result:{array:["b","c"],item:"a"}}],description:"shift Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},T=async({namedInputs:e,params:t})=>{a.arrayValidate("arrayFlatAgent",e);const r=t.depth??1;return{array:e.array.map((e=>e)).flat(r)}},x={name:"arrayFlatAgent",agent:T,mock:T,inputs:{type:"object",properties:{array:{type:"array",description:"flat array"}},required:["array"]},output:{type:"object",properties:{array:{type:"array",description:"the remaining array"}}},params:{type:"object",properties:{depth:{type:"number",description:"array depth"}}},samples:[{inputs:{array:[[1],[2],[3]]},params:{},result:{array:[1,2,3]}},{inputs:{array:[[1],[2],[[3]]]},params:{},result:{array:[1,2,[3]]}},{inputs:{array:[[1],[2],[[3]]]},params:{depth:2},result:{array:[1,2,3]}},{inputs:{array:[["a"],["b"],["c"]]},params:{},result:{array:["a","b","c"]}}],description:"Array Flat Agent",category:["array"],author:"Receptron team",repository:"https://github.com/receptron/graphai",cacheType:"pureAgent",license:"MIT"},v=async({namedInputs:e,params:t})=>{a.arrayValidate("arrayJoinAgent",e);const r=t.separator??"",{flat:s}=t;return{text:s?e.array.flat(s).join(r):e.array.join(r)}},j={name:"arrayJoinAgent",agent:v,mock:v,inputs:{type:"object",properties:{array:{type:"array",description:"array join"}},required:["array"]},params:{type:"object",properties:{separator:{type:"string",description:"array join separator"},flat:{type:"number",description:"array flat depth"}}},output:{type:"object",properties:{text:{type:"string",description:"joined text"}}},samples:[{inputs:{array:[[1],[2],[3]]},params:{},result:{text:"123"}},{inputs:{array:[[1],[2],[[3]]]},params:{},result:{text:"123"}},{inputs:{array:[["a"],["b"],["c"]]},params:{},result:{text:"abc"}},{inputs:{array:[[1],[2],[3]]},params:{separator:"|"},result:{text:"1|2|3"}},{inputs:{array:[[[1]],[[2],[3]]]},params:{separator:"|"},result:{text:"1|2,3"}},{inputs:{array:[[[1]],[[2],[3]]]},params:{separator:"|",flat:1},result:{text:"1|2|3"}},{inputs:{array:[[[[1]],[[2],[3]]]]},params:{separator:"|",flat:1},result:{text:"1|2,3"}},{inputs:{array:[[[[1]],[[2],[3]]]]},params:{separator:"|",flat:2},result:{text:"1|2|3"}}],description:"Array Join Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},E=async({namedInputs:a})=>{e.assert(!!a,"dotProductAgent: namedInputs is UNDEFINED!");const t=a.matrix,r=a.vector;if(t[0].length!=r.length)throw new Error(`dotProduct: Length of vectors do not match. ${t[0].length}, ${r.length}`);return t.map((e=>e.reduce(((e,a,t)=>e+a*r[t]),0)))},N={name:"dotProductAgent",agent:E,mock:E,inputs:{type:"object",properties:{matrix:{type:"array",description:"two dimentional matrix",items:{type:"array",items:{type:"number"}}},vector:{type:"array",description:"the vector",items:{type:"number"}}},required:["matrix","vector"]},output:{type:"array"},samples:[{inputs:{matrix:[[1,2],[3,4],[5,6]],vector:[3,2]},params:{},result:[7,17,27]},{inputs:{matrix:[[1,2],[2,3]],vector:[1,2]},params:{},result:[5,8]}],description:"dotProduct Agent",category:["matrix"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},M=async({params:a,namedInputs:t})=>{e.assert(!!t,"sortByValue: namedInputs is UNDEFINED!"),e.assert(!!t.array,"sortByValue: namedInputs.array is UNDEFINED!"),e.assert(!!t.values,"sortByValue: namedInputs.values is UNDEFINED!");const r=a?.assendant?-1:1,s=t.array,n=t.values;return s.map(((e,a)=>({item:e,value:n[a]}))).sort(((e,a)=>(a.value-e.value)*r)).map((e=>e.item))},_={name:"sortByValuesAgent",agent:M,mock:M,inputs:{type:"object",properties:{array:{type:"array",description:"the array to sort"},values:{type:"array",description:"values associated with items in the array"}},required:["array","values"]},output:{type:"array"},samples:[{inputs:{array:["banana","orange","lemon","apple"],values:[2,5,6,4]},params:{},result:["lemon","orange","apple","banana"]},{inputs:{array:["banana","orange","lemon","apple"],values:[2,5,6,4]},params:{assendant:!0},result:["banana","apple","orange","lemon"]}],description:"sortByValues Agent",category:["matrix"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},R=async({params:e,filterParams:a})=>e.filterParams?a:e,S={name:"echoAgent",agent:R,mock:R,samples:[{inputs:{},params:{text:"this is test"},result:{text:"this is test"}},{inputs:{},params:{text:"If you add filterParams option, it will respond to filterParams",filterParams:!0},result:{}}],description:"Echo agent",category:["test"],cacheType:"pureAgent",author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},O=async({params:e})=>({list:new Array(e.count).fill(void 0).map(((e,a)=>a))}),V={name:"countingAgent",agent:O,mock:O,samples:[{inputs:{},params:{count:4},result:{list:[0,1,2,3]}}],description:"Counting agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},D=async({params:e})=>({messages:new Array(e.count).fill(void 0).map((()=>e.message))}),P={name:"copyMessageAgent",agent:D,mock:D,samples:[{inputs:{},params:{count:4,message:"hello"},result:{messages:["hello","hello","hello","hello"]}}],description:"CopyMessage agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},$=async({namedInputs:t,params:r})=>{e.assert(a.isNamedInputs(t),"copy2ArrayAgent: namedInputs is UNDEFINED!");const s=t.item?t.item:t;return new Array(r.count).fill(void 0).map((()=>s))},q={name:"copy2ArrayAgent",agent:$,mock:$,samples:[{inputs:{item:{message:"hello"}},params:{count:10},result:[{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"}]},{inputs:{message:"hello"},params:{count:10},result:[{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"}]},{inputs:{item:"hello"},params:{count:10},result:["hello","hello","hello","hello","hello","hello","hello","hello","hello","hello"]}],description:"Copy2Array agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},C=async({debugInfo:{nodeId:e},namedInputs:t})=>{a.arrayValidate("mergeNodeIdAgent",t);return t.array.reduce(((e,a)=>({...e,...a})),{[e]:"hello"})},F={name:"mergeNodeIdAgent",agent:C,mock:C,samples:[{inputs:{array:[{message:"hello"}]},params:{},result:{message:"hello",test:"hello"}}],description:"merge node id agent",category:["test"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},z=async({params:a,filterParams:t,namedInputs:r})=>{const s=a.message??r.message??"";for await(const r of s.split(""))t.streamTokenCallback&&t.streamTokenCallback(r),await e.sleep(a.sleep||100);return{message:s}},U={name:"streamMockAgent",agent:z,mock:z,inputs:{anyOf:[{type:"object",properties:{message:{type:"string",description:"streaming message"}}},{type:"array"}]},samples:[{inputs:{},params:{message:"this is params test"},result:{message:"this is params test"}},{inputs:{message:"this is named inputs test"},params:{},result:{message:"this is named inputs test"}}],description:"Stream mock agent",category:["test"],author:"Isamu Arimoto",repository:"https://github.com/receptron/graphai",license:"MIT",stream:!0},J=async a=>{const{forNestedGraph:t}=a,{graphData:r}=t??{graphData:{nodes:{}}};return e.assert(!!r,"No GraphData"),await(a=>async t=>{const{namedInputs:r,log:s,debugInfo:n,params:o,forNestedGraph:p}=t;e.assert(!!p,"Please update graphai to 0.5.19 or higher");const{agents:i,graphOptions:m,onLogCallback:l}=p,{taskManager:u}=m,c=o.throwError??!1;if(u){const a=u.getStatus(!1);e.assert(a.concurrency>a.running,`nestedAgent: Concurrency is too low: ${a.concurrency}`)}e.assert(!!a,"nestedAgent: graph is required");const{nodes:g}=a,y={...a,nodes:{...g},version:e.graphDataLatestVersion},d=Object.keys(r);d.length>0&&d.forEach((e=>{void 0===y.nodes[e]?y.nodes[e]={value:r[e]}:y.nodes[e].value=r[e]}));try{void 0===y.version&&n.version&&(y.version=n.version);const a=new e.GraphAI(y,i||{},m);l&&(a.onLogCallback=l);const t=await a.run(!1);return s?.push(...a.transactionLogs()),t}catch(e){if(e instanceof Error&&!c)return{onError:{message:e.message,error:e}};throw e}})(r)(a)},Y={name:"nestedAgent",agent:J,mock:J,samples:[{inputs:{message:"hello"},params:{},result:{test:["hello"]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"messages"},inputs:{messages:[":message"]},isResult:!0}}}}],description:"nested Agent",category:["graph"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},K=async({params:a,namedInputs:t,log:r,debugInfo:s,forNestedGraph:n})=>{e.assert(!!n,"Please update graphai to 0.5.19 or higher");const{agents:o,graphData:p,graphOptions:i,onLogCallback:m}=n,{taskManager:l}=i;if(l){const a=l.getStatus();e.assert(a.concurrency>a.running,`mapAgent: Concurrency is too low: ${a.concurrency}`)}e.assert(!!t.rows,"mapAgent: rows property is required in namedInput"),e.assert(!!p,"mapAgent: graph is required");const u=t.rows.map((e=>e));a.limit&&a.limit{const a="rows"===e?"row":e;void 0===d.nodes[a]?d.nodes[a]={value:t[e]}:"agent"in d.nodes[a]||(d.nodes[a].value=t[e])}));try{void 0===d.version&&s.version&&(d.version=s.version);const t=u.map(((a,t)=>{const r=new e.GraphAI(d,o||{},i);return r.injectValue("row",a,"__mapAgent_inputs__"),r.injectValue("__mapIndex",t,"__mapAgent_inputs__"),m&&(r.onLogCallback=m),r})),n=t.map((e=>e.run(c))),p=await Promise.all(n),l=Object.keys(p[0]);if(r){const e=t.map(((e,a)=>e.transactionLogs().map((e=>(e.mapIndex=a,e)))));r.push(...e.flat())}if(a.compositeResult){return l.reduce(((e,a)=>(e[a]=p.map((e=>e[a])),e)),{})}return p}catch(e){if(e instanceof Error&&!g)return{onError:{message:e.message,error:e}};throw e}},L={name:"mapAgent",agent:K,mock:K,samples:[{inputs:{rows:[1,2]},params:{},result:[{test:[1]},{test:[2]}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]},isResult:!0}}}},{inputs:{rows:["apple","orange","banana","lemon","melon","pineapple","tomato"]},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${word}."},inputs:{word:":row"},isResult:!0}}},result:[{node2:"I love apple."},{node2:"I love orange."},{node2:"I love banana."},{node2:"I love lemon."},{node2:"I love melon."},{node2:"I love pineapple."},{node2:"I love tomato."}]},{inputs:{rows:[{fruit:"apple"},{fruit:"orange"}]},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${item}."},inputs:{item:":row.fruit"},isResult:!0}}},result:[{node2:"I love apple."},{node2:"I love orange."}]},{inputs:{rows:[{fruit:"apple"},{fruit:"orange"}],name:"You",verb:"like"},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"${name} ${verb} ${fruit}."},inputs:{fruit:":row.fruit",name:":name",verb:":verb"},isResult:!0}}},result:[{node2:"You like apple."},{node2:"You like orange."}]},{inputs:{rows:[1,2]},params:{resultAll:!0},result:[{__mapIndex:0,test:[1],row:1},{__mapIndex:1,test:[2],row:2}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}},{inputs:{rows:[1,2]},params:{resultAll:!0},result:[{__mapIndex:0,map:[{test:1},{test:1}],row:1,test:1},{__mapIndex:1,map:[{test:2},{test:2}],test:2,row:2}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"row"},inputs:{row:":row"}},map:{agent:"mapAgent",inputs:{rows:[":test",":test"]},graph:{nodes:{test:{isResult:!0,agent:"copyAgent",params:{namedKey:"row"},inputs:{row:":row"}}}}}}}},{inputs:{rows:[1,2]},params:{compositeResult:!0},result:{test:[[1],[2]]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]},isResult:!0}}}},{inputs:{rows:["apple","orange","banana","lemon","melon","pineapple","tomato"]},params:{compositeResult:!0},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${row}."},inputs:{row:":row"},isResult:!0}}},result:{node2:["I love apple.","I love orange.","I love banana.","I love lemon.","I love melon.","I love pineapple.","I love tomato."]}},{inputs:{rows:[1,2]},params:{resultAll:!0,compositeResult:!0},result:{test:[[1],[2]],__mapIndex:[0,1],row:[1,2]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}},{inputs:{rows:[1,2]},params:{resultAll:!0,compositeResult:!0},result:{__mapIndex:[0,1],test:[[1],[2]],map:[{test:[[[1]],[[1]]]},{test:[[[2]],[[2]]]}],row:[1,2]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}},map:{agent:"mapAgent",inputs:{rows:[":test",":test"]},params:{compositeResult:!0},graph:{nodes:{test:{isResult:!0,agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}}}}}],description:"Map Agent",category:["graph"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},H=async({namedInputs:t})=>(e.assert(a.isNamedInputs(t),"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }"),e.assert(!!t?.array,"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }"),t.array.reduce(((e,a)=>((Array.isArray(a)?a:[a]).forEach((a=>{Object.keys(a).forEach((t=>{const r=a[t];e[t]?e[t]+=r:e[t]=r}))})),e)),{})),G={name:"totalAgent",agent:H,mock:H,inputs:{type:"object",properties:{array:{type:"array",description:"the array"}},required:["array"]},output:{type:"object"},samples:[{inputs:{array:[{a:1},{a:2},{a:3}]},params:{},result:{a:6}},{inputs:{array:[[{a:1,b:-1},{c:10}],[{a:2,b:-1}],[{a:3,b:-2},{d:-10}]]},params:{},result:{a:6,b:-4,c:10,d:-10}},{inputs:{array:[{a:1}]},params:{},result:{a:1}},{inputs:{array:[{a:1},{a:2}]},params:{},result:{a:3}},{inputs:{array:[{a:1},{a:2},{a:3}]},params:{},result:{a:6}},{inputs:{array:[{a:1,b:1},{a:2,b:2},{a:3,b:0}]},params:{},result:{a:6,b:3}},{inputs:{array:[{a:1},{a:2,b:2},{a:3,b:0}]},params:{},result:{a:6,b:2}}],description:"Returns the sum of input values",category:["data"],author:"Satoshi Nakajima",repository:"https://github.com/snakajima/graphai",license:"MIT"},B=async({namedInputs:t})=>(e.assert(a.isNamedInputs(t),"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }"),e.assert(!!t?.array,"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }"),t.array.reduce(((e,a)=>e+a),0)),X={name:"dataSumTemplateAgent",agent:B,mock:B,inputs:{type:"object",properties:{array:{type:"array",description:"the array of numbers to calculate the sum of",items:{type:"integer"}}},required:["array"]},output:{type:"number"},samples:[{inputs:{array:[1]},params:{},result:1},{inputs:{array:[1,2]},params:{},result:3},{inputs:{array:[1,2,3]},params:{},result:6}],description:"Returns the sum of input values",category:["data"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},W=(e,a,t,r,s,n,o,p,i)=>{const m=r||Object.keys(e),l=new Set(s??[]),u=m.reduce(((a,t)=>{if(!l.has(t)){const r=n&&n[t];r&&r[e[t]]?a[t]=r[e[t]]:a[t]=e[t]}return a}),{});return o&&o.forEach((e=>{void 0!==e.index&&e.index!==a||(u[e.propId]=t[e.from])})),i&&i.forEach((e=>{const a=t[e.from??1];e.equal?u[e.propId]=e.equal===a:e.notEqual&&(u[e.propId]=e.notEqual!==a)})),p&&Object.keys(p).forEach((e=>{const a=u[e];u[e]=u[p[e]],u[p[e]]=a})),u},Q=async({namedInputs:e,params:a})=>{const{include:t,exclude:r,alter:s,inject:n,swap:o,inspect:p}=a,{array:i,item:m}=e;if(i){const[e]=i;return Array.isArray(e)?e.map(((e,a)=>W(e,a,i,t,r,s,n,o,p))):W(e,0,i,t,r,s,n,o,p)}return!!m&&W(m,0,[],t,r,s,n,o,p)},Z={array:[[{color:"red",model:"Model 3",type:"EV",maker:"Tesla",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400}],"Tesla Motors"]},ee={name:"propertyFilterAgent",agent:Q,mock:Q,inputs:{type:"object"},output:{type:"any",properties:{array:{type:"array",description:"the array to apply filter"},item:{type:"object",description:"the object to apply filter"}}},samples:[{inputs:{array:[Z.array[0][0]]},params:{include:["color","model"]},result:{color:"red",model:"Model 3"}},{inputs:{item:Z.array[0][0]},params:{include:["color","model"]},result:{color:"red",model:"Model 3"}},{inputs:Z,params:{include:["color","model"]},result:[{color:"red",model:"Model 3"},{color:"blue",model:"Model Y"}]},{inputs:Z,params:{exclude:["color","model"]},result:[{type:"EV",maker:"Tesla",range:300},{type:"EV",maker:"Tesla",range:400}]},{inputs:{item:Z.array[0][0]},params:{exclude:["color","model"]},result:{type:"EV",maker:"Tesla",range:300}},{inputs:Z,params:{alter:{color:{red:"blue",blue:"red"}}},result:[{color:"blue",model:"Model 3",type:"EV",maker:"Tesla",range:300},{color:"red",model:"Model Y",type:"EV",maker:"Tesla",range:400}]},{inputs:{item:Z.array[0][0]},params:{alter:{color:{red:"blue",blue:"red"}}},result:{color:"blue",model:"Model 3",type:"EV",maker:"Tesla",range:300}},{inputs:Z,params:{swap:{maker:"model"}},result:[{color:"red",model:"Tesla",type:"EV",maker:"Model 3",range:300},{color:"blue",model:"Tesla",type:"EV",maker:"Model Y",range:400}]},{inputs:{item:Z.array[0][0]},params:{swap:{maker:"model"}},result:{color:"red",model:"Tesla",type:"EV",maker:"Model 3",range:300}},{inputs:Z,params:{inject:[{propId:"maker",from:1}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla Motors",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla Motors",range:400}]},{inputs:Z,params:{inject:[{propId:"maker",from:1,index:0}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla Motors",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400}]},{inputs:Z,params:{inspect:[{propId:"isTesla",equal:"Tesla Motors"},{propId:"isGM",notEqual:"Tesla Motors",from:1}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla",range:300,isTesla:!0,isGM:!1},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400,isTesla:!0,isGM:!1}]}],description:"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'",category:["data"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},ae=async({namedInputs:t,params:r})=>{const{namedKey:s}=r;return e.assert(a.isNamedInputs(t),"copyAgent: namedInputs is UNDEFINED!"),s?t[s]:t},te={name:"copyAgent",agent:ae,mock:ae,inputs:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},output:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},samples:[{inputs:{color:"red",model:"Model 3"},params:{},result:{color:"red",model:"Model 3"}},{inputs:{array:["Hello World","Discarded"]},params:{},result:{array:["Hello World","Discarded"]}},{inputs:{color:"red",model:"Model 3"},params:{namedKey:"color"},result:"red"}],description:"Returns namedInputs",category:["data"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},re=async({namedInputs:e,params:a})=>{const{url:t,method:r,queryParams:s,headers:n,body:o}=e,p=a.throwError??!1,i=new URL(t),m=n?{...n}:{};if(s){const e=new URLSearchParams(s);i.search=e.toString()}o&&(m["Content-Type"]="application/json");const l={method:r??o?"POST":"GET",headers:new Headers(m),body:o?JSON.stringify(o):void 0};if(a?.debug)return{url:i.toString(),method:l.method,headers:m,body:l.body};const u=await fetch(i.toString(),l);if(!u.ok){const e=u.status,t="json"===(a?.type??"json")?await u.json():await u.text();if(p)throw new Error(`HTTP error: ${e}`);return{onError:{message:`HTTP error: ${e}`,status:e,error:t}}}return await(async()=>{const e=a?.type??"json";if("json"===e)return await u.json();if("text"===e)return u.text();throw new Error(`Unknown Type! ${e}`)})()},se={name:"vanillaFetchAgent",agent:re,mock:re,inputs:{type:"object",properties:{url:{type:"string",description:"baseurl"},method:{type:"string",description:"HTTP method"},headers:{type:"object",description:"HTTP headers"},quaryParams:{type:"object",description:"Query parameters"},body:{anyOf:[{type:"string"},{type:"object"}],description:"body"}},required:["url"]},output:{type:"array"},samples:[{inputs:{url:"https://www.google.com",queryParams:{foo:"bar"},headers:{"x-myHeader":"secret"}},params:{debug:!0},result:{method:"GET",url:"https://www.google.com/?foo=bar",headers:{"x-myHeader":"secret"},body:void 0}},{inputs:{url:"https://www.google.com",body:{foo:"bar"}},params:{debug:!0},result:{method:"POST",url:"https://www.google.com/",headers:{"Content-Type":"application/json"},body:JSON.stringify({foo:"bar"})}}],description:"Retrieves JSON data from the specified URL",category:["service"],author:"Receptron",repository:"https://github.com/receptron/graphai",license:"MIT"},ne=async({params:a,namedInputs:t})=>(await e.sleep(a?.duration??10),t),oe={name:"sleeperAgent",agent:ne,mock:ne,samples:[{inputs:{},params:{duration:1},result:{}},{inputs:{array:[{a:1},{b:2}]},params:{duration:1},result:{array:[{a:1},{b:2}]}}],description:"sleeper Agent",category:["sleeper"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},pe=e=>{if(3!==e.length)throw new Error("compare inputs length must must be 3");const a=e.map((e=>Array.isArray(e)?pe(e):e)),[t,r,s]=a;if("=="===r)return t===s;if("!="===r)return t!==s;if(">"===r)return Number(t)>Number(s);if(">="===r)return Number(t)>=Number(s);if("<"===r)return Number(t){const t=pe(e.array);return a?.value?a?.value[t?"true":"false"]??t:t},me={name:"compareAgent",agent:ie,mock:ie,inputs:{},output:{},samples:[{inputs:{array:["abc","==","abc"]},params:{value:{true:"a",false:"b"}},result:"a"},{inputs:{array:["abc","==","abca"]},params:{value:{true:"a",false:"b"}},result:"b"},{inputs:{array:["abc","==","abc"]},params:{},result:!0},{inputs:{array:["abc","==","abcd"]},params:{},result:!1},{inputs:{array:["abc","!=","abc"]},params:{},result:!1},{inputs:{array:["abc","!=","abcd"]},params:{},result:!0},{inputs:{array:["10",">","5"]},params:{},result:!0},{inputs:{array:["10",">","15"]},params:{},result:!1},{inputs:{array:[10,">",5]},params:{},result:!0},{inputs:{array:[10,">",15]},params:{},result:!1},{inputs:{array:["10",">=","5"]},params:{},result:!0},{inputs:{array:["10",">=","10"]},params:{},result:!0},{inputs:{array:["10",">=","19"]},params:{},result:!1},{inputs:{array:[10,">=",5]},params:{},result:!0},{inputs:{array:[10,">=",10]},params:{},result:!0},{inputs:{array:[10,">=",19]},params:{},result:!1},{inputs:{array:["10","<","5"]},params:{},result:!1},{inputs:{array:["10","<","15"]},params:{},result:!0},{inputs:{array:[10,"<",5]},params:{},result:!1},{inputs:{array:[10,"<",15]},params:{},result:!0},{inputs:{array:["10","<=","5"]},params:{},result:!1},{inputs:{array:["10","<=","10"]},params:{},result:!0},{inputs:{array:["10","<=","19"]},params:{},result:!0},{inputs:{array:[10,"<=",5]},params:{},result:!1},{inputs:{array:[10,"<=",10]},params:{},result:!0},{inputs:{array:[10,"<=",19]},params:{},result:!0},{inputs:{array:[!0,"||",!1]},params:{},result:!0},{inputs:{array:[!1,"||",!1]},params:{},result:!1},{inputs:{array:[!0,"&&",!1]},params:{},result:!1},{inputs:{array:[!0,"&&",!0]},params:{},result:!0},{inputs:{array:[!0,"XOR",!1]},params:{},result:!0},{inputs:{array:[!1,"XOR",!0]},params:{},result:!0},{inputs:{array:[!1,"XOR",!1]},params:{},result:!1},{inputs:{array:[!0,"XOR",!0]},params:{},result:!1},{inputs:{array:[["aaa","==","aaa"],"||",["aaa","==","bbb"]]},params:{},result:!0},{inputs:{array:[["aaa","==","aaa"],"&&",["aaa","==","bbb"]]},params:{},result:!1},{inputs:{array:[[["aaa","==","aaa"],"&&",["bbb","==","bbb"]],"||",["aaa","&&","bbb"]]},params:{},result:!0}],description:"compare",category:["compare"],author:"Receptron",repository:"https://github.com/receptron/graphai",license:"MIT"},le=async({namedInputs:t,params:r})=>{const{imageType:s,detail:n}=r,{array:o,prompt:p}=t;a.arrayValidate("images2messageAgent",t),e.assert(!!s,"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...");const i=o.map((e=>{const a=((e,a,t)=>"http"===a?{url:e}:{url:`data:image/${a};base64,${e}`,detail:t??"auto"})(e,s,n);return{type:"image_url",image_url:a}}));return p&&i.unshift({type:"text",text:p}),{message:{role:"user",content:i}}},ue={name:"images2messageAgent",agent:le,mock:le,inputs:{type:"object",properties:{array:{type:"array",description:"the array of base64 image data"},prompt:{type:"string",description:"prompt message"}},required:["array"]},output:{type:"object"},samples:[{inputs:{array:["abcabc","122123"]},params:{imageType:"png"},result:{message:{content:[{image_url:{detail:"auto",url:"data:image/png;base64,abcabc"},type:"image_url"},{image_url:{detail:"auto",url:"data:image/png;base64,122123"},type:"image_url"}],role:"user"}}},{inputs:{array:["abcabc","122123"],prompt:"hello"},params:{imageType:"jpg",detail:"high"},result:{message:{content:[{type:"text",text:"hello"},{image_url:{detail:"high",url:"data:image/jpg;base64,abcabc"},type:"image_url"},{image_url:{detail:"high",url:"data:image/jpg;base64,122123"},type:"image_url"}],role:"user"}}},{inputs:{array:["http://example.com/1.jpg","http://example.com/2.jpg"]},params:{imageType:"http"},result:{message:{content:[{image_url:{url:"http://example.com/1.jpg"},type:"image_url"},{image_url:{url:"http://example.com/2.jpg"},type:"image_url"}],role:"user"}}}],description:"Returns the message data for llm include image",category:["image"],author:"Receptron team",repository:"https://github.com/snakajima/graphai",license:"MIT"},ce=async({params:e,namedInputs:a})=>{const{array:t,item:r}=a,s=t??[r],n=process.env.OPENAI_API_KEY;if(!n)throw new Error("OPENAI_API_KEY key is not set in environment variables.");const o={"Content-Type":"application/json",Authorization:`Bearer ${n}`},p=await fetch("https://api.openai.com/v1/embeddings",{method:"POST",headers:o,body:JSON.stringify({input:s,model:e?.model??"text-embedding-3-small"})}),i=await p.json();if(!p.ok)throw new Error(`HTTP error! status: ${p.status}`);return i.data.map((e=>e.embedding))},ge={name:"stringEmbeddingsAgent",agent:ce,mock:ce,samples:[],description:"Embeddings Agent",category:["embedding"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"};exports.arrayFlatAgent=x,exports.arrayJoinAgent=j,exports.compareAgent=me,exports.copy2ArrayAgent=q,exports.copyAgent=te,exports.copyMessageAgent=P,exports.countingAgent=V,exports.dataSumTemplateAgent=X,exports.dotProductAgent=N,exports.echoAgent=S,exports.images2messageAgent=ue,exports.jsonParserAgent=y,exports.mapAgent=L,exports.mergeNodeIdAgent=F,exports.nestedAgent=Y,exports.popAgent=w,exports.propertyFilterAgent=ee,exports.pushAgent=f,exports.shiftAgent=k,exports.sleeperAgent=oe,exports.sortByValuesAgent=_,exports.streamMockAgent=U,exports.stringCaseVariantsAgent=h,exports.stringEmbeddingsAgent=ge,exports.stringSplitterAgent=r,exports.stringTemplateAgent=p,exports.totalAgent=G,exports.vanillaFetchAgent=se; +"use strict";var e=require("graphai"),t=require("@graphai/agent_utils");const a=async({params:t,namedInputs:a})=>{e.assert(!!a,"stringSplitterAgent: namedInputs is UNDEFINED!");const r=a.text,s=t.chunkSize??2048,n=t.overlap??Math.floor(s/8),o=Math.floor(r.length/(s-n))+1;return{contents:new Array(o).fill(void 0).map(((e,t)=>{const a=t*(s-n);return r.substring(a,a+s)})),count:o,chunkSize:s,overlap:n}},r={name:"stringSplitterAgent",agent:a,mock:a,inputs:{type:"object",properties:{text:{type:"string",description:"text to be chuncked"}},required:["text"]},output:{type:"object",properties:{contents:{type:"array",description:"the array of text chunks"},count:{type:"number",description:"the number of chunks"},chunkSize:{type:"number",description:"the chunk size"},overlap:{type:"number",description:"the overlap size"}}},samples:[{inputs:{text:"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do."},params:{chunkSize:64},result:{contents:["Here's to the crazy ones, the misfits, the rebels, the troublema","roublemakers, the round pegs in the square holes ... the ones wh"," ones who see things differently -- they're not fond of rules, a","rules, and they have no respect for the status quo. ... You can ","You can quote them, disagree with them, glorify or vilify them, ","y them, but the only thing you can't do is ignore them because t","ecause they change things. ... They push the human race forward,","forward, and while some may see them as the crazy ones, we see g","we see genius, because the people who are crazy enough to think ","o think that they can change the world, are the ones who do."," do."],count:11,chunkSize:64,overlap:8}}],description:"This agent strip one long string into chunks using following parameters",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},s=(t,a,r)=>"string"==typeof t?t===a?r:t.replace(a,r):Array.isArray(t)?t.map((e=>s(e,a,r))):e.isObject(t)?Object.keys(t).reduce(((e,n)=>(e[n]=s(t[n],a,r),e)),{}):t,n=async({params:e,namedInputs:t})=>{if(void 0===e.template){if(t.text)return t.text;console.warn("warning: stringTemplateAgent no template")}return Object.keys(t).reduce(((e,a)=>s(e,"${"+a+"}",t[a])),e.template)},o={message1:"hello",message2:"test"},p={name:"stringTemplateAgent",agent:n,mock:n,samples:[{inputs:o,params:{template:"${message1}: ${message2}"},result:"hello: test"},{inputs:o,params:{template:["${message1}: ${message2}","${message2}: ${message1}"]},result:["hello: test","test: hello"]},{inputs:o,params:{template:{apple:"${message1}",lemon:"${message2}"}},result:{apple:"hello",lemon:"test"}},{inputs:o,params:{template:[{apple:"${message1}",lemon:"${message2}"}]},result:[{apple:"hello",lemon:"test"}]},{inputs:o,params:{template:{apple:"${message1}",lemon:["${message2}"]}},result:{apple:"hello",lemon:["test"]}},{inputs:{agent:"openAiAgent",row:"hello world",params:{text:"message"}},params:{template:{version:.5,nodes:{ai:{agent:"${agent}",isResult:!0,params:"${params}",inputs:{prompt:"${row}"}}}}},result:{nodes:{ai:{agent:"openAiAgent",inputs:{prompt:"hello world"},isResult:!0,params:{text:"message"}}},version:.5}}],description:"Template agent",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},i=async({namedInputs:e})=>{const{text:t,data:a}=e;if(a)return JSON.stringify(a,null,2);const r=("\n"+t).match(/\n```[a-zA-z]*([\s\S]*?)\n```/);return r?JSON.parse(r[1]):JSON.parse(t)},l={apple:"red",lemon:"yellow"},m=JSON.stringify(l),u=["```",m,"```"].join("\n"),c=["```json",m,"```"].join("\n"),g=["```JSON",m,"```"].join("\n"),y={name:"jsonParserAgent",agent:i,mock:i,inputs:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},output:{type:"string"},samples:[{inputs:{data:l},params:{},result:JSON.stringify(l,null,2)},{inputs:{text:JSON.stringify(l,null,2)},params:{},result:l},{inputs:{text:u},params:{},result:l},{inputs:{text:c},params:{},result:l},{inputs:{text:g},params:{},result:l}],description:"Template agent",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},d=async({namedInputs:e,params:t})=>{const{suffix:a}=t,r=e.text.trim().replace(/[\s-_]+/g," ").toLowerCase().split(" ");a&&r[r.length-1]!==a&&r.push(a);const s=r.join(" ");return{lowerCamelCase:r.map(((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1))).join(""),snakeCase:s.replace(/\s+/g,"_"),kebabCase:s.replace(/\s+/g,"-"),normalized:s}},h={name:"stringCaseVariantsAgent",agent:d,mock:d,samples:[{inputs:{text:"this is a pen"},params:{},result:{kebabCase:"this-is-a-pen",lowerCamelCase:"thisIsAPen",normalized:"this is a pen",snakeCase:"this_is_a_pen"}},{inputs:{text:"string case variants"},params:{suffix:"agent"},result:{kebabCase:"string-case-variants-agent",lowerCamelCase:"stringCaseVariantsAgent",normalized:"string case variants agent",snakeCase:"string_case_variants_agent"}}],description:"Format String Cases agent",category:["string"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},b=(t,a)=>async r=>{const{namedInputs:s,log:n,debugInfo:o,params:p,forNestedGraph:i}=r;e.assert(!!i,"Please update graphai to 0.5.19 or higher");const{agents:l,graphOptions:m,onLogCallback:u}=i,{taskManager:c}=m,g=p.throwError??!1;if(c){const t=c.getStatus(!1);e.assert(t.concurrency>t.running,`nestedAgent: Concurrency is too low: ${t.concurrency}`)}e.assert(!!t,"nestedAgent: graph is required");const{nodes:y}=t,d={...t,nodes:{...y},version:e.graphDataLatestVersion},h=Object.keys(s);h.length>0&&h.forEach((e=>{void 0===d.nodes[e]?d.nodes[e]={value:s[e]}:d.nodes[e].value=s[e]}));try{void 0===d.version&&o.version&&(d.version=o.version);const t=new e.GraphAI(d,l||{},m);u&&(t.onLogCallback=u);const r=await t.run(!1);return n?.push(...t.transactionLogs()),a&&a.resultNodeId?r[a.resultNodeId]:r}catch(e){if(e instanceof Error&&!g)return{onError:{message:e.message,error:e}};throw e}},w=async t=>{const{forNestedGraph:a}=t,{graphData:r}=a??{graphData:{nodes:{}}};return e.assert(!!r,"No GraphData"),await b(r)(t)},A={name:"nestedAgent",agent:w,mock:w,samples:[{inputs:{message:"hello"},params:{},result:{test:["hello"]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"messages"},inputs:{messages:[":message"]},isResult:!0}}}}],description:"nested Agent",category:["graph"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},f={version:e.graphDataLatestVersion,nodes:{isNewText:{if:":newText",agent:"copyAgent",inputs:{text:":newText"}},isOldText:{unless:":newText",agent:"copyAgent",inputs:{text:":oldText"}},updatedText:{agent:"copyAgent",anyInput:!0,inputs:{text:[":isNewText.text",":isOldText.text"]}},resultText:{isResult:!0,agent:"copyAgent",anyInput:!0,inputs:{text:":updatedText.text.$0"}}}},I=b(f,{resultNodeId:"resultText"}),x={name:"updateTextAgent",agent:I,mock:I,samples:[{inputs:{newText:"new",oldText:"old"},params:{},result:{text:"new"}},{inputs:{newText:"",oldText:"old"},params:{},result:{text:"old"}}],description:"",category:[],author:"",repository:"",tools:[],license:"",hasGraphData:!0},T=async({namedInputs:a})=>{const r=" Set inputs: { array: :arrayNodeId, item: :itemNodeId }";t.arrayValidate("pushAgent",a,r);const{item:s,items:n}=a;e.assert(!(!s&&!n),"pushAgent: namedInputs.item is UNDEFINED!"+r);const o=a.array.map((e=>e));return s?o.push(s):n.forEach((e=>{o.push(e)})),{array:o}},k={name:"pushAgent",agent:T,mock:T,inputs:{type:"object",properties:{array:{type:"array",description:"the array to push an item to"},item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item push into the array"},items:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item push into the array"}},required:["array"]},output:{type:"object",properties:{array:{type:"array"}}},samples:[{inputs:{array:[1,2],item:3},params:{},result:{array:[1,2,3]}},{inputs:{array:[{apple:1}],item:{lemon:2}},params:{},result:{array:[{apple:1},{lemon:2}]}},{inputs:{array:[{apple:1}],items:[{lemon:2},{banana:3}]},params:{},result:{array:[{apple:1},{lemon:2},{banana:3}]}}],description:"push Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},v=async({namedInputs:e})=>{t.arrayValidate("popAgent",e);const a=e.array.map((e=>e)),r=a.pop();return{array:a,item:r}},j={name:"popAgent",agent:v,mock:v,inputs:{type:"object",properties:{array:{type:"array",description:"the array to pop an item from"}},required:["array"]},output:{type:"object",properties:{item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item popped from the array"},array:{type:"array",description:"the remaining array"}}},samples:[{inputs:{array:[1,2,3]},params:{},result:{array:[1,2],item:3}},{inputs:{array:["a","b","c"]},params:{},result:{array:["a","b"],item:"c"}},{inputs:{array:[1,2,3],array2:["a","b","c"]},params:{},result:{array:[1,2],item:3}}],description:"Pop Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},E=async({namedInputs:e})=>{t.arrayValidate("shiftAgent",e);const a=e.array.map((e=>e)),r=a.shift();return{array:a,item:r}},N={name:"shiftAgent",agent:E,mock:E,inputs:{type:"object",properties:{array:{type:"array",description:"the array to shift an item from"}},required:["array"]},output:{type:"object",properties:{item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item shifted from the array"},array:{type:"array",description:"the remaining array"}}},samples:[{inputs:{array:[1,2,3]},params:{},result:{array:[2,3],item:1}},{inputs:{array:["a","b","c"]},params:{},result:{array:["b","c"],item:"a"}}],description:"shift Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},M=async({namedInputs:e,params:a})=>{t.arrayValidate("arrayFlatAgent",e);const r=a.depth??1;return{array:e.array.map((e=>e)).flat(r)}},_={name:"arrayFlatAgent",agent:M,mock:M,inputs:{type:"object",properties:{array:{type:"array",description:"flat array"}},required:["array"]},output:{type:"object",properties:{array:{type:"array",description:"the remaining array"}}},params:{type:"object",properties:{depth:{type:"number",description:"array depth"}}},samples:[{inputs:{array:[[1],[2],[3]]},params:{},result:{array:[1,2,3]}},{inputs:{array:[[1],[2],[[3]]]},params:{},result:{array:[1,2,[3]]}},{inputs:{array:[[1],[2],[[3]]]},params:{depth:2},result:{array:[1,2,3]}},{inputs:{array:[["a"],["b"],["c"]]},params:{},result:{array:["a","b","c"]}}],description:"Array Flat Agent",category:["array"],author:"Receptron team",repository:"https://github.com/receptron/graphai",cacheType:"pureAgent",license:"MIT"},R=async({namedInputs:e,params:a})=>{t.arrayValidate("arrayJoinAgent",e);const r=a.separator??"",{flat:s}=a;return{text:s?e.array.flat(s).join(r):e.array.join(r)}},S={name:"arrayJoinAgent",agent:R,mock:R,inputs:{type:"object",properties:{array:{type:"array",description:"array join"}},required:["array"]},params:{type:"object",properties:{separator:{type:"string",description:"array join separator"},flat:{type:"number",description:"array flat depth"}}},output:{type:"object",properties:{text:{type:"string",description:"joined text"}}},samples:[{inputs:{array:[[1],[2],[3]]},params:{},result:{text:"123"}},{inputs:{array:[[1],[2],[[3]]]},params:{},result:{text:"123"}},{inputs:{array:[["a"],["b"],["c"]]},params:{},result:{text:"abc"}},{inputs:{array:[[1],[2],[3]]},params:{separator:"|"},result:{text:"1|2|3"}},{inputs:{array:[[[1]],[[2],[3]]]},params:{separator:"|"},result:{text:"1|2,3"}},{inputs:{array:[[[1]],[[2],[3]]]},params:{separator:"|",flat:1},result:{text:"1|2|3"}},{inputs:{array:[[[[1]],[[2],[3]]]]},params:{separator:"|",flat:1},result:{text:"1|2,3"}},{inputs:{array:[[[[1]],[[2],[3]]]]},params:{separator:"|",flat:2},result:{text:"1|2|3"}}],description:"Array Join Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},O=async({namedInputs:t})=>{e.assert(!!t,"dotProductAgent: namedInputs is UNDEFINED!");const a=t.matrix,r=t.vector;if(a[0].length!=r.length)throw new Error(`dotProduct: Length of vectors do not match. ${a[0].length}, ${r.length}`);return a.map((e=>e.reduce(((e,t,a)=>e+t*r[a]),0)))},V={name:"dotProductAgent",agent:O,mock:O,inputs:{type:"object",properties:{matrix:{type:"array",description:"two dimentional matrix",items:{type:"array",items:{type:"number"}}},vector:{type:"array",description:"the vector",items:{type:"number"}}},required:["matrix","vector"]},output:{type:"array"},samples:[{inputs:{matrix:[[1,2],[3,4],[5,6]],vector:[3,2]},params:{},result:[7,17,27]},{inputs:{matrix:[[1,2],[2,3]],vector:[1,2]},params:{},result:[5,8]}],description:"dotProduct Agent",category:["matrix"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},D=async({params:t,namedInputs:a})=>{e.assert(!!a,"sortByValue: namedInputs is UNDEFINED!"),e.assert(!!a.array,"sortByValue: namedInputs.array is UNDEFINED!"),e.assert(!!a.values,"sortByValue: namedInputs.values is UNDEFINED!");const r=t?.assendant?-1:1,s=a.array,n=a.values;return s.map(((e,t)=>({item:e,value:n[t]}))).sort(((e,t)=>(t.value-e.value)*r)).map((e=>e.item))},P={name:"sortByValuesAgent",agent:D,mock:D,inputs:{type:"object",properties:{array:{type:"array",description:"the array to sort"},values:{type:"array",description:"values associated with items in the array"}},required:["array","values"]},output:{type:"array"},samples:[{inputs:{array:["banana","orange","lemon","apple"],values:[2,5,6,4]},params:{},result:["lemon","orange","apple","banana"]},{inputs:{array:["banana","orange","lemon","apple"],values:[2,5,6,4]},params:{assendant:!0},result:["banana","apple","orange","lemon"]}],description:"sortByValues Agent",category:["matrix"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},$=async({params:e,filterParams:t})=>e.filterParams?t:e,q={name:"echoAgent",agent:$,mock:$,samples:[{inputs:{},params:{text:"this is test"},result:{text:"this is test"}},{inputs:{},params:{text:"If you add filterParams option, it will respond to filterParams",filterParams:!0},result:{}}],description:"Echo agent",category:["test"],cacheType:"pureAgent",author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},C=async({params:e})=>({list:new Array(e.count).fill(void 0).map(((e,t)=>t))}),F={name:"countingAgent",agent:C,mock:C,samples:[{inputs:{},params:{count:4},result:{list:[0,1,2,3]}}],description:"Counting agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},z=async({params:e})=>({messages:new Array(e.count).fill(void 0).map((()=>e.message))}),U={name:"copyMessageAgent",agent:z,mock:z,samples:[{inputs:{},params:{count:4,message:"hello"},result:{messages:["hello","hello","hello","hello"]}}],description:"CopyMessage agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},J=async({namedInputs:a,params:r})=>{e.assert(t.isNamedInputs(a),"copy2ArrayAgent: namedInputs is UNDEFINED!");const s=a.item?a.item:a;return new Array(r.count).fill(void 0).map((()=>s))},Y={name:"copy2ArrayAgent",agent:J,mock:J,samples:[{inputs:{item:{message:"hello"}},params:{count:10},result:[{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"}]},{inputs:{message:"hello"},params:{count:10},result:[{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"}]},{inputs:{item:"hello"},params:{count:10},result:["hello","hello","hello","hello","hello","hello","hello","hello","hello","hello"]}],description:"Copy2Array agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},L=async({debugInfo:{nodeId:e},namedInputs:a})=>{t.arrayValidate("mergeNodeIdAgent",a);return a.array.reduce(((e,t)=>({...e,...t})),{[e]:"hello"})},K={name:"mergeNodeIdAgent",agent:L,mock:L,samples:[{inputs:{array:[{message:"hello"}]},params:{},result:{message:"hello",test:"hello"}}],description:"merge node id agent",category:["test"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},G=async({params:t,filterParams:a,namedInputs:r})=>{const s=t.message??r.message??"";for await(const r of s.split(""))a.streamTokenCallback&&a.streamTokenCallback(r),await e.sleep(t.sleep||100);return{message:s}},H={name:"streamMockAgent",agent:G,mock:G,inputs:{anyOf:[{type:"object",properties:{message:{type:"string",description:"streaming message"}}},{type:"array"}]},samples:[{inputs:{},params:{message:"this is params test"},result:{message:"this is params test"}},{inputs:{message:"this is named inputs test"},params:{},result:{message:"this is named inputs test"}}],description:"Stream mock agent",category:["test"],author:"Isamu Arimoto",repository:"https://github.com/receptron/graphai",license:"MIT",stream:!0},B=async({params:t,namedInputs:a,log:r,debugInfo:s,forNestedGraph:n})=>{e.assert(!!n,"Please update graphai to 0.5.19 or higher");const{agents:o,graphData:p,graphOptions:i,onLogCallback:l}=n,{taskManager:m}=i;if(m){const t=m.getStatus();e.assert(t.concurrency>t.running,`mapAgent: Concurrency is too low: ${t.concurrency}`)}e.assert(!!a.rows,"mapAgent: rows property is required in namedInput"),e.assert(!!p,"mapAgent: graph is required");const u=a.rows.map((e=>e));t.limit&&t.limit{const t="rows"===e?"row":e;void 0===d.nodes[t]?d.nodes[t]={value:a[e]}:"agent"in d.nodes[t]||(d.nodes[t].value=a[e])}));try{void 0===d.version&&s.version&&(d.version=s.version);const a=u.map(((t,a)=>{const r=new e.GraphAI(d,o||{},i);return r.injectValue("row",t,"__mapAgent_inputs__"),r.injectValue("__mapIndex",a,"__mapAgent_inputs__"),l&&(r.onLogCallback=l),r})),n=a.map((e=>e.run(c))),p=await Promise.all(n),m=Object.keys(p[0]);if(r){const e=a.map(((e,t)=>e.transactionLogs().map((e=>(e.mapIndex=t,e)))));r.push(...e.flat())}if(t.compositeResult){return m.reduce(((e,t)=>(e[t]=p.map((e=>e[t])),e)),{})}return p}catch(e){if(e instanceof Error&&!g)return{onError:{message:e.message,error:e}};throw e}},X={name:"mapAgent",agent:B,mock:B,samples:[{inputs:{rows:[1,2]},params:{},result:[{test:[1]},{test:[2]}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]},isResult:!0}}}},{inputs:{rows:["apple","orange","banana","lemon","melon","pineapple","tomato"]},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${word}."},inputs:{word:":row"},isResult:!0}}},result:[{node2:"I love apple."},{node2:"I love orange."},{node2:"I love banana."},{node2:"I love lemon."},{node2:"I love melon."},{node2:"I love pineapple."},{node2:"I love tomato."}]},{inputs:{rows:[{fruit:"apple"},{fruit:"orange"}]},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${item}."},inputs:{item:":row.fruit"},isResult:!0}}},result:[{node2:"I love apple."},{node2:"I love orange."}]},{inputs:{rows:[{fruit:"apple"},{fruit:"orange"}],name:"You",verb:"like"},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"${name} ${verb} ${fruit}."},inputs:{fruit:":row.fruit",name:":name",verb:":verb"},isResult:!0}}},result:[{node2:"You like apple."},{node2:"You like orange."}]},{inputs:{rows:[1,2]},params:{resultAll:!0},result:[{__mapIndex:0,test:[1],row:1},{__mapIndex:1,test:[2],row:2}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}},{inputs:{rows:[1,2]},params:{resultAll:!0},result:[{__mapIndex:0,map:[{test:1},{test:1}],row:1,test:1},{__mapIndex:1,map:[{test:2},{test:2}],test:2,row:2}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"row"},inputs:{row:":row"}},map:{agent:"mapAgent",inputs:{rows:[":test",":test"]},graph:{nodes:{test:{isResult:!0,agent:"copyAgent",params:{namedKey:"row"},inputs:{row:":row"}}}}}}}},{inputs:{rows:[1,2]},params:{compositeResult:!0},result:{test:[[1],[2]]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]},isResult:!0}}}},{inputs:{rows:["apple","orange","banana","lemon","melon","pineapple","tomato"]},params:{compositeResult:!0},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${row}."},inputs:{row:":row"},isResult:!0}}},result:{node2:["I love apple.","I love orange.","I love banana.","I love lemon.","I love melon.","I love pineapple.","I love tomato."]}},{inputs:{rows:[1,2]},params:{resultAll:!0,compositeResult:!0},result:{test:[[1],[2]],__mapIndex:[0,1],row:[1,2]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}},{inputs:{rows:[1,2]},params:{resultAll:!0,compositeResult:!0},result:{__mapIndex:[0,1],test:[[1],[2]],map:[{test:[[[1]],[[1]]]},{test:[[[2]],[[2]]]}],row:[1,2]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}},map:{agent:"mapAgent",inputs:{rows:[":test",":test"]},params:{compositeResult:!0},graph:{nodes:{test:{isResult:!0,agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}}}}}],description:"Map Agent",category:["graph"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},W=async({namedInputs:a})=>(e.assert(t.isNamedInputs(a),"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }"),e.assert(!!a?.array,"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }"),a.array.reduce(((e,t)=>((Array.isArray(t)?t:[t]).forEach((t=>{Object.keys(t).forEach((a=>{const r=t[a];e[a]?e[a]+=r:e[a]=r}))})),e)),{})),Q={name:"totalAgent",agent:W,mock:W,inputs:{type:"object",properties:{array:{type:"array",description:"the array"}},required:["array"]},output:{type:"object"},samples:[{inputs:{array:[{a:1},{a:2},{a:3}]},params:{},result:{a:6}},{inputs:{array:[[{a:1,b:-1},{c:10}],[{a:2,b:-1}],[{a:3,b:-2},{d:-10}]]},params:{},result:{a:6,b:-4,c:10,d:-10}},{inputs:{array:[{a:1}]},params:{},result:{a:1}},{inputs:{array:[{a:1},{a:2}]},params:{},result:{a:3}},{inputs:{array:[{a:1},{a:2},{a:3}]},params:{},result:{a:6}},{inputs:{array:[{a:1,b:1},{a:2,b:2},{a:3,b:0}]},params:{},result:{a:6,b:3}},{inputs:{array:[{a:1},{a:2,b:2},{a:3,b:0}]},params:{},result:{a:6,b:2}}],description:"Returns the sum of input values",category:["data"],author:"Satoshi Nakajima",repository:"https://github.com/snakajima/graphai",license:"MIT"},Z=async({namedInputs:a})=>(e.assert(t.isNamedInputs(a),"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }"),e.assert(!!a?.array,"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }"),a.array.reduce(((e,t)=>e+t),0)),ee={name:"dataSumTemplateAgent",agent:Z,mock:Z,inputs:{type:"object",properties:{array:{type:"array",description:"the array of numbers to calculate the sum of",items:{type:"integer"}}},required:["array"]},output:{type:"number"},samples:[{inputs:{array:[1]},params:{},result:1},{inputs:{array:[1,2]},params:{},result:3},{inputs:{array:[1,2,3]},params:{},result:6}],description:"Returns the sum of input values",category:["data"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},te=(e,t,a,r,s,n,o,p,i)=>{const l=r||Object.keys(e),m=new Set(s??[]),u=l.reduce(((t,a)=>{if(!m.has(a)){const r=n&&n[a];r&&r[e[a]]?t[a]=r[e[a]]:t[a]=e[a]}return t}),{});return o&&o.forEach((e=>{void 0!==e.index&&e.index!==t||(u[e.propId]=a[e.from])})),i&&i.forEach((e=>{const t=a[e.from??1];e.equal?u[e.propId]=e.equal===t:e.notEqual&&(u[e.propId]=e.notEqual!==t)})),p&&Object.keys(p).forEach((e=>{const t=u[e];u[e]=u[p[e]],u[p[e]]=t})),u},ae=async({namedInputs:e,params:t})=>{const{include:a,exclude:r,alter:s,inject:n,swap:o,inspect:p}=t,{array:i,item:l}=e;if(i){const[e]=i;return Array.isArray(e)?e.map(((e,t)=>te(e,t,i,a,r,s,n,o,p))):te(e,0,i,a,r,s,n,o,p)}return!!l&&te(l,0,[],a,r,s,n,o,p)},re={array:[[{color:"red",model:"Model 3",type:"EV",maker:"Tesla",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400}],"Tesla Motors"]},se={name:"propertyFilterAgent",agent:ae,mock:ae,inputs:{type:"object"},output:{type:"any",properties:{array:{type:"array",description:"the array to apply filter"},item:{type:"object",description:"the object to apply filter"}}},samples:[{inputs:{array:[re.array[0][0]]},params:{include:["color","model"]},result:{color:"red",model:"Model 3"}},{inputs:{item:re.array[0][0]},params:{include:["color","model"]},result:{color:"red",model:"Model 3"}},{inputs:re,params:{include:["color","model"]},result:[{color:"red",model:"Model 3"},{color:"blue",model:"Model Y"}]},{inputs:re,params:{exclude:["color","model"]},result:[{type:"EV",maker:"Tesla",range:300},{type:"EV",maker:"Tesla",range:400}]},{inputs:{item:re.array[0][0]},params:{exclude:["color","model"]},result:{type:"EV",maker:"Tesla",range:300}},{inputs:re,params:{alter:{color:{red:"blue",blue:"red"}}},result:[{color:"blue",model:"Model 3",type:"EV",maker:"Tesla",range:300},{color:"red",model:"Model Y",type:"EV",maker:"Tesla",range:400}]},{inputs:{item:re.array[0][0]},params:{alter:{color:{red:"blue",blue:"red"}}},result:{color:"blue",model:"Model 3",type:"EV",maker:"Tesla",range:300}},{inputs:re,params:{swap:{maker:"model"}},result:[{color:"red",model:"Tesla",type:"EV",maker:"Model 3",range:300},{color:"blue",model:"Tesla",type:"EV",maker:"Model Y",range:400}]},{inputs:{item:re.array[0][0]},params:{swap:{maker:"model"}},result:{color:"red",model:"Tesla",type:"EV",maker:"Model 3",range:300}},{inputs:re,params:{inject:[{propId:"maker",from:1}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla Motors",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla Motors",range:400}]},{inputs:re,params:{inject:[{propId:"maker",from:1,index:0}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla Motors",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400}]},{inputs:re,params:{inspect:[{propId:"isTesla",equal:"Tesla Motors"},{propId:"isGM",notEqual:"Tesla Motors",from:1}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla",range:300,isTesla:!0,isGM:!1},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400,isTesla:!0,isGM:!1}]}],description:"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'",category:["data"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},ne=async({namedInputs:a,params:r})=>{const{namedKey:s}=r;return e.assert(t.isNamedInputs(a),"copyAgent: namedInputs is UNDEFINED!"),s?a[s]:a},oe={name:"copyAgent",agent:ne,mock:ne,inputs:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},output:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},samples:[{inputs:{color:"red",model:"Model 3"},params:{},result:{color:"red",model:"Model 3"}},{inputs:{array:["Hello World","Discarded"]},params:{},result:{array:["Hello World","Discarded"]}},{inputs:{color:"red",model:"Model 3"},params:{namedKey:"color"},result:"red"}],description:"Returns namedInputs",category:["data"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},pe=async({namedInputs:e,params:t})=>{const{url:a,method:r,queryParams:s,headers:n,body:o}=e,p=t.throwError??!1,i=new URL(a),l=n?{...n}:{};if(s){const e=new URLSearchParams(s);i.search=e.toString()}o&&(l["Content-Type"]="application/json");const m={method:r??o?"POST":"GET",headers:new Headers(l),body:o?JSON.stringify(o):void 0};if(t?.debug)return{url:i.toString(),method:m.method,headers:l,body:m.body};const u=await fetch(i.toString(),m);if(!u.ok){const e=u.status,a="json"===(t?.type??"json")?await u.json():await u.text();if(p)throw new Error(`HTTP error: ${e}`);return{onError:{message:`HTTP error: ${e}`,status:e,error:a}}}return await(async()=>{const e=t?.type??"json";if("json"===e)return await u.json();if("text"===e)return u.text();throw new Error(`Unknown Type! ${e}`)})()},ie={name:"vanillaFetchAgent",agent:pe,mock:pe,inputs:{type:"object",properties:{url:{type:"string",description:"baseurl"},method:{type:"string",description:"HTTP method"},headers:{type:"object",description:"HTTP headers"},quaryParams:{type:"object",description:"Query parameters"},body:{anyOf:[{type:"string"},{type:"object"}],description:"body"}},required:["url"]},output:{type:"array"},samples:[{inputs:{url:"https://www.google.com",queryParams:{foo:"bar"},headers:{"x-myHeader":"secret"}},params:{debug:!0},result:{method:"GET",url:"https://www.google.com/?foo=bar",headers:{"x-myHeader":"secret"},body:void 0}},{inputs:{url:"https://www.google.com",body:{foo:"bar"}},params:{debug:!0},result:{method:"POST",url:"https://www.google.com/",headers:{"Content-Type":"application/json"},body:JSON.stringify({foo:"bar"})}}],description:"Retrieves JSON data from the specified URL",category:["service"],author:"Receptron",repository:"https://github.com/receptron/graphai",license:"MIT"},le=async({params:t,namedInputs:a})=>(await e.sleep(t?.duration??10),a),me={name:"sleeperAgent",agent:le,mock:le,samples:[{inputs:{},params:{duration:1},result:{}},{inputs:{array:[{a:1},{b:2}]},params:{duration:1},result:{array:[{a:1},{b:2}]}}],description:"sleeper Agent",category:["sleeper"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},ue=e=>{if(3!==e.length)throw new Error("compare inputs length must must be 3");const t=e.map((e=>Array.isArray(e)?ue(e):e)),[a,r,s]=t;if("=="===r)return a===s;if("!="===r)return a!==s;if(">"===r)return Number(a)>Number(s);if(">="===r)return Number(a)>=Number(s);if("<"===r)return Number(a){const a=ue(e.array);return t?.value?t?.value[a?"true":"false"]??a:a},ge={name:"compareAgent",agent:ce,mock:ce,inputs:{},output:{},samples:[{inputs:{array:["abc","==","abc"]},params:{value:{true:"a",false:"b"}},result:"a"},{inputs:{array:["abc","==","abca"]},params:{value:{true:"a",false:"b"}},result:"b"},{inputs:{array:["abc","==","abc"]},params:{},result:!0},{inputs:{array:["abc","==","abcd"]},params:{},result:!1},{inputs:{array:["abc","!=","abc"]},params:{},result:!1},{inputs:{array:["abc","!=","abcd"]},params:{},result:!0},{inputs:{array:["10",">","5"]},params:{},result:!0},{inputs:{array:["10",">","15"]},params:{},result:!1},{inputs:{array:[10,">",5]},params:{},result:!0},{inputs:{array:[10,">",15]},params:{},result:!1},{inputs:{array:["10",">=","5"]},params:{},result:!0},{inputs:{array:["10",">=","10"]},params:{},result:!0},{inputs:{array:["10",">=","19"]},params:{},result:!1},{inputs:{array:[10,">=",5]},params:{},result:!0},{inputs:{array:[10,">=",10]},params:{},result:!0},{inputs:{array:[10,">=",19]},params:{},result:!1},{inputs:{array:["10","<","5"]},params:{},result:!1},{inputs:{array:["10","<","15"]},params:{},result:!0},{inputs:{array:[10,"<",5]},params:{},result:!1},{inputs:{array:[10,"<",15]},params:{},result:!0},{inputs:{array:["10","<=","5"]},params:{},result:!1},{inputs:{array:["10","<=","10"]},params:{},result:!0},{inputs:{array:["10","<=","19"]},params:{},result:!0},{inputs:{array:[10,"<=",5]},params:{},result:!1},{inputs:{array:[10,"<=",10]},params:{},result:!0},{inputs:{array:[10,"<=",19]},params:{},result:!0},{inputs:{array:[!0,"||",!1]},params:{},result:!0},{inputs:{array:[!1,"||",!1]},params:{},result:!1},{inputs:{array:[!0,"&&",!1]},params:{},result:!1},{inputs:{array:[!0,"&&",!0]},params:{},result:!0},{inputs:{array:[!0,"XOR",!1]},params:{},result:!0},{inputs:{array:[!1,"XOR",!0]},params:{},result:!0},{inputs:{array:[!1,"XOR",!1]},params:{},result:!1},{inputs:{array:[!0,"XOR",!0]},params:{},result:!1},{inputs:{array:[["aaa","==","aaa"],"||",["aaa","==","bbb"]]},params:{},result:!0},{inputs:{array:[["aaa","==","aaa"],"&&",["aaa","==","bbb"]]},params:{},result:!1},{inputs:{array:[[["aaa","==","aaa"],"&&",["bbb","==","bbb"]],"||",["aaa","&&","bbb"]]},params:{},result:!0}],description:"compare",category:["compare"],author:"Receptron",repository:"https://github.com/receptron/graphai",license:"MIT"},ye=async({namedInputs:a,params:r})=>{const{imageType:s,detail:n}=r,{array:o,prompt:p}=a;t.arrayValidate("images2messageAgent",a),e.assert(!!s,"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...");const i=o.map((e=>{const t=((e,t,a)=>"http"===t?{url:e}:{url:`data:image/${t};base64,${e}`,detail:a??"auto"})(e,s,n);return{type:"image_url",image_url:t}}));return p&&i.unshift({type:"text",text:p}),{message:{role:"user",content:i}}},de={name:"images2messageAgent",agent:ye,mock:ye,inputs:{type:"object",properties:{array:{type:"array",description:"the array of base64 image data"},prompt:{type:"string",description:"prompt message"}},required:["array"]},output:{type:"object"},samples:[{inputs:{array:["abcabc","122123"]},params:{imageType:"png"},result:{message:{content:[{image_url:{detail:"auto",url:"data:image/png;base64,abcabc"},type:"image_url"},{image_url:{detail:"auto",url:"data:image/png;base64,122123"},type:"image_url"}],role:"user"}}},{inputs:{array:["abcabc","122123"],prompt:"hello"},params:{imageType:"jpg",detail:"high"},result:{message:{content:[{type:"text",text:"hello"},{image_url:{detail:"high",url:"data:image/jpg;base64,abcabc"},type:"image_url"},{image_url:{detail:"high",url:"data:image/jpg;base64,122123"},type:"image_url"}],role:"user"}}},{inputs:{array:["http://example.com/1.jpg","http://example.com/2.jpg"]},params:{imageType:"http"},result:{message:{content:[{image_url:{url:"http://example.com/1.jpg"},type:"image_url"},{image_url:{url:"http://example.com/2.jpg"},type:"image_url"}],role:"user"}}}],description:"Returns the message data for llm include image",category:["image"],author:"Receptron team",repository:"https://github.com/snakajima/graphai",license:"MIT"},he=async({params:e,namedInputs:t})=>{const{array:a,item:r}=t,s=a??[r],n=process.env.OPENAI_API_KEY;if(!n)throw new Error("OPENAI_API_KEY key is not set in environment variables.");const o={"Content-Type":"application/json",Authorization:`Bearer ${n}`},p=await fetch("https://api.openai.com/v1/embeddings",{method:"POST",headers:o,body:JSON.stringify({input:s,model:e?.model??"text-embedding-3-small"})}),i=await p.json();if(!p.ok)throw new Error(`HTTP error! status: ${p.status}`);return i.data.map((e=>e.embedding))},be={name:"stringEmbeddingsAgent",agent:he,mock:he,samples:[],description:"Embeddings Agent",category:["embedding"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"};exports.arrayFlatAgent=_,exports.arrayJoinAgent=S,exports.compareAgent=ge,exports.copy2ArrayAgent=Y,exports.copyAgent=oe,exports.copyMessageAgent=U,exports.countingAgent=F,exports.dataSumTemplateAgent=ee,exports.dotProductAgent=V,exports.echoAgent=q,exports.images2messageAgent=de,exports.jsonParserAgent=y,exports.mapAgent=X,exports.mergeNodeIdAgent=K,exports.nestedAgent=A,exports.popAgent=j,exports.propertyFilterAgent=se,exports.pushAgent=k,exports.shiftAgent=N,exports.sleeperAgent=me,exports.sortByValuesAgent=P,exports.streamMockAgent=H,exports.stringCaseVariantsAgent=h,exports.stringEmbeddingsAgent=be,exports.stringSplitterAgent=r,exports.stringTemplateAgent=p,exports.totalAgent=Q,exports.updateTextAgent=x,exports.vanillaFetchAgent=ie; //# sourceMappingURL=bundle.cjs.min.js.map diff --git a/agents/vanilla_agents/lib/bundle.cjs.min.js.map b/agents/vanilla_agents/lib/bundle.cjs.min.js.map index efc65ae2..906ee046 100644 --- a/agents/vanilla_agents/lib/bundle.cjs.min.js.map +++ b/agents/vanilla_agents/lib/bundle.cjs.min.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.cjs.min.js","sources":["../src/string_agents/string_splitter_agent.ts","../src/string_agents/string_template_agent.ts","../src/string_agents/json_parser_agent.ts","../src/string_agents/string_case_variants_agent.ts","../src/array_agents/push_agent.ts","../src/array_agents/pop_agent.ts","../src/array_agents/shift_agent.ts","../src/array_agents/array_flat_agent.ts","../src/array_agents/array_join_agent.ts","../src/matrix_agents/dot_product_agent.ts","../src/matrix_agents/sort_by_values_agent.ts","../src/test_agents/echo_agent.ts","../src/test_agents/counting_agent.ts","../src/test_agents/copy_message_agent.ts","../src/test_agents/copy2array_agent.ts","../src/test_agents/merge_node_id_agent.ts","../src/test_agents/stream_mock_agent.ts","../src/graph_agents/nested_agent.ts","../src/graph_agents/map_agent.ts","../src/data_agents/total_agent.ts","../src/data_agents/data_sum_template_agent.ts","../src/data_agents/property_filter_agent.ts","../src/data_agents/copy_agent.ts","../src/service_agents/vanilla_fetch_agent.ts","../src/sleeper_agents/sleeper_agent.ts","../src/compare_agents/compare_agent.ts","../src/images_agents/image_to_message_agent.ts","../src/embedding_agent.ts"],"sourcesContent":["import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent strip one long string into chunks using following parameters\n//\n// chunkSize: number; // default is 2048\n// overlap: number; // default is 1/8th of chunkSize.\n//\n// see example\n// tests/agents/test_string_agent.ts\n//\nconst defaultChunkSize = 2048;\n\nexport const stringSplitterAgent: AgentFunction<\n {\n chunkSize?: number;\n overlap?: number;\n },\n {\n contents: Array;\n count: number;\n chunkSize: number;\n overlap: number;\n },\n {\n text: string;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"stringSplitterAgent: namedInputs is UNDEFINED!\");\n const source = namedInputs.text;\n const chunkSize = params.chunkSize ?? defaultChunkSize;\n const overlap = params.overlap ?? Math.floor(chunkSize / 8);\n const count = Math.floor(source.length / (chunkSize - overlap)) + 1;\n const contents = new Array(count).fill(undefined).map((_, i) => {\n const startIndex = i * (chunkSize - overlap);\n return source.substring(startIndex, startIndex + chunkSize);\n });\n\n return { contents, count, chunkSize, overlap };\n};\n\n// for test and document\nconst sampleInput = {\n text: \"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do.\",\n};\n\nconst sampleParams = { chunkSize: 64 };\nconst sampleResult = {\n contents: [\n \"Here's to the crazy ones, the misfits, the rebels, the troublema\",\n \"roublemakers, the round pegs in the square holes ... the ones wh\",\n \" ones who see things differently -- they're not fond of rules, a\",\n \"rules, and they have no respect for the status quo. ... You can \",\n \"You can quote them, disagree with them, glorify or vilify them, \",\n \"y them, but the only thing you can't do is ignore them because t\",\n \"ecause they change things. ... They push the human race forward,\",\n \"forward, and while some may see them as the crazy ones, we see g\",\n \"we see genius, because the people who are crazy enough to think \",\n \"o think that they can change the world, are the ones who do.\",\n \" do.\",\n ],\n count: 11,\n chunkSize: 64,\n overlap: 8,\n};\n\nconst stringSplitterAgentInfo: AgentFunctionInfo = {\n name: \"stringSplitterAgent\",\n agent: stringSplitterAgent,\n mock: stringSplitterAgent,\n inputs: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"text to be chuncked\",\n },\n },\n required: [\"text\"],\n },\n output: {\n type: \"object\",\n properties: {\n contents: {\n type: \"array\",\n description: \"the array of text chunks\",\n },\n count: {\n type: \"number\",\n description: \"the number of chunks\",\n },\n chunkSize: {\n type: \"number\",\n description: \"the chunk size\",\n },\n overlap: {\n type: \"number\",\n description: \"the overlap size\",\n },\n },\n },\n samples: [\n {\n inputs: sampleInput,\n params: sampleParams,\n result: sampleResult,\n },\n ],\n description: \"This agent strip one long string into chunks using following parameters\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringSplitterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, isObject } from \"graphai\";\n\ntype StringTemplate = string | Record;\ntype StringTemplateObject = StringTemplate | StringTemplate[] | Record;\n\nconst processTemplate: any = (template: StringTemplateObject, match: string, input: string) => {\n if (typeof template === \"string\") {\n if (template === match) {\n return input;\n }\n return template.replace(match, input);\n } else if (Array.isArray(template)) {\n return template.map((item: StringTemplate) => processTemplate(item, match, input));\n }\n\n if (isObject(template)) {\n return Object.keys(template).reduce((tmp: any, key: string) => {\n tmp[key] = processTemplate(template[key], match, input);\n return tmp;\n }, {});\n }\n return template;\n};\n\nexport const stringTemplateAgent: AgentFunction<\n {\n template: StringTemplateObject;\n },\n StringTemplateObject,\n Record\n> = async ({ params, namedInputs }) => {\n if (params.template === undefined) {\n if (namedInputs.text) {\n return namedInputs.text;\n }\n console.warn(\"warning: stringTemplateAgent no template\");\n }\n return Object.keys(namedInputs).reduce((template, key) => {\n return processTemplate(template, \"${\" + key + \"}\", namedInputs[key]);\n }, params.template);\n};\n\nconst sampleNamedInput = { message1: \"hello\", message2: \"test\" };\n\n// for test and document\nconst stringTemplateAgentInfo: AgentFunctionInfo = {\n name: \"stringTemplateAgent\",\n agent: stringTemplateAgent,\n mock: stringTemplateAgent,\n samples: [\n // named\n {\n inputs: sampleNamedInput,\n params: { template: \"${message1}: ${message2}\" },\n result: \"hello: test\",\n },\n {\n inputs: sampleNamedInput,\n params: { template: [\"${message1}: ${message2}\", \"${message2}: ${message1}\"] },\n result: [\"hello: test\", \"test: hello\"],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: \"${message2}\" } },\n result: { apple: \"hello\", lemon: \"test\" },\n },\n {\n inputs: sampleNamedInput,\n params: { template: [{ apple: \"${message1}\", lemon: \"${message2}\" }] },\n result: [{ apple: \"hello\", lemon: \"test\" }],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: [\"${message2}\"] } },\n result: { apple: \"hello\", lemon: [\"test\"] },\n },\n // graphData\n {\n inputs: { agent: \"openAiAgent\", row: \"hello world\", params: { text: \"message\" } },\n params: {\n template: {\n version: 0.5,\n nodes: {\n ai: {\n agent: \"${agent}\",\n isResult: true,\n params: \"${params}\",\n inputs: { prompt: \"${row}\" },\n },\n },\n },\n },\n result: {\n nodes: {\n ai: {\n agent: \"openAiAgent\",\n inputs: {\n prompt: \"hello world\",\n },\n isResult: true,\n params: { text: \"message\" },\n },\n },\n version: 0.5,\n },\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const jsonParserAgent: AgentFunction<\n null,\n unknown,\n {\n text: string;\n data: unknown;\n }\n> = async ({ namedInputs }) => {\n const { text, data } = namedInputs;\n\n if (data) {\n return JSON.stringify(data, null, 2);\n }\n const match = (\"\\n\" + text).match(/\\n```[a-zA-z]*([\\s\\S]*?)\\n```/);\n if (match) {\n return JSON.parse(match[1]);\n }\n return JSON.parse(text);\n};\n\nconst sample_object = { apple: \"red\", lemon: \"yellow\" };\n\nconst json_str = JSON.stringify(sample_object);\nconst md_json1 = [\"```\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json2 = [\"```json\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json3 = [\"```JSON\", json_str, \"```\"].join(\"\\n\");\n\nconst jsonParserAgentInfo: AgentFunctionInfo = {\n name: \"jsonParserAgent\",\n agent: jsonParserAgent,\n mock: jsonParserAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n type: \"string\",\n },\n samples: [\n {\n inputs: { data: sample_object },\n params: {},\n result: JSON.stringify(sample_object, null, 2),\n },\n {\n inputs: { text: JSON.stringify(sample_object, null, 2) },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json1 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json2 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json3 },\n params: {},\n result: sample_object,\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default jsonParserAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const stringCaseVariantsAgent: AgentFunction<\n { suffix?: string },\n { lowerCamelCase: string; snakeCase: string; kebabCase: string; normalized: string },\n { text: string }\n> = async ({ namedInputs, params }) => {\n const { suffix } = params;\n const normalizedArray = namedInputs.text\n .trim()\n .replace(/[\\s-_]+/g, \" \")\n .toLowerCase()\n .split(\" \");\n if (suffix && normalizedArray[normalizedArray.length - 1] !== suffix) {\n normalizedArray.push(suffix);\n }\n const normalized = normalizedArray.join(\" \");\n\n const lowerCamelCase = normalizedArray\n .map((word, index) => {\n if (index === 0) return word;\n return word.charAt(0).toUpperCase() + word.slice(1);\n })\n .join(\"\");\n\n const snakeCase = normalized.replace(/\\s+/g, \"_\");\n const kebabCase = normalized.replace(/\\s+/g, \"-\");\n\n return { lowerCamelCase, snakeCase, kebabCase, normalized };\n};\n\nconst stringCaseVariantsAgentInfo: AgentFunctionInfo = {\n name: \"stringCaseVariantsAgent\",\n agent: stringCaseVariantsAgent,\n mock: stringCaseVariantsAgent,\n samples: [\n {\n inputs: { text: \"this is a pen\" },\n params: {},\n result: {\n kebabCase: \"this-is-a-pen\",\n lowerCamelCase: \"thisIsAPen\",\n normalized: \"this is a pen\",\n snakeCase: \"this_is_a_pen\",\n },\n },\n {\n inputs: { text: \"string case variants\" },\n params: { suffix: \"agent\" },\n result: {\n kebabCase: \"string-case-variants-agent\",\n lowerCamelCase: \"stringCaseVariantsAgent\",\n normalized: \"string case variants agent\",\n snakeCase: \"string_case_variants_agent\",\n },\n },\n ],\n description: \"Format String Cases agent\",\n category: [\"string\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringCaseVariantsAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const pushAgent: AgentFunction }, { array: Array; item?: unknown; items: Array }> = async ({\n namedInputs,\n}) => {\n const extra_message = \" Set inputs: { array: :arrayNodeId, item: :itemNodeId }\";\n arrayValidate(\"pushAgent\", namedInputs, extra_message);\n const { item, items } = namedInputs;\n assert(!!(item || items), \"pushAgent: namedInputs.item is UNDEFINED!\" + extra_message);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n if (item) {\n array.push(item);\n } else {\n items.forEach((item) => {\n array.push(item);\n });\n }\n return {\n array,\n };\n};\n\nconst pushAgentInfo: AgentFunctionInfo = {\n name: \"pushAgent\",\n agent: pushAgent,\n mock: pushAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to push an item to\",\n },\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n items: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2], item: 3 },\n params: {},\n result: { array: [1, 2, 3] },\n },\n {\n inputs: { array: [{ apple: 1 }], item: { lemon: 2 } },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }] },\n },\n {\n inputs: { array: [{ apple: 1 }], items: [{ lemon: 2 }, { banana: 3 }] },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }, { banana: 3 }] },\n },\n ],\n description: \"push Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default pushAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const popAgent: AgentFunction; item: unknown }, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"popAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.pop();\n return { array, item };\n};\n\nconst popAgentInfo: AgentFunctionInfo = {\n name: \"popAgent\",\n agent: popAgent,\n mock: popAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to pop an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item popped from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"a\", \"b\"],\n item: \"c\",\n },\n },\n {\n inputs: {\n array: [1, 2, 3],\n array2: [\"a\", \"b\", \"c\"],\n },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n ],\n description: \"Pop Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default popAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const shiftAgent: AgentFunction, Record, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"shiftAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.shift();\n return { array, item };\n};\n\nconst shiftAgentInfo: AgentFunctionInfo = {\n name: \"shiftAgent\",\n agent: shiftAgent,\n mock: shiftAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to shift an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item shifted from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [2, 3],\n item: 1,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"b\", \"c\"],\n item: \"a\",\n },\n },\n ],\n description: \"shift Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default shiftAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayFlatAgent: AgentFunction<{ depth?: number }, { array: Array }, { array: Array }> = async ({ namedInputs, params }) => {\n arrayValidate(\"arrayFlatAgent\", namedInputs);\n const depth = params.depth ?? 1;\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n return { array: array.flat(depth) };\n};\n\nconst arrayFlatAgentInfo: AgentFunctionInfo = {\n name: \"arrayFlatAgent\",\n agent: arrayFlatAgent,\n mock: arrayFlatAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"flat array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n params: {\n type: \"object\",\n properties: {\n depth: {\n type: \"number\",\n description: \"array depth\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n array: [1, 2, [3]],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: { depth: 2 },\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n array: [\"a\", \"b\", \"c\"],\n },\n },\n ],\n description: \"Array Flat Agent\",\n category: [\"array\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n cacheType: \"pureAgent\",\n license: \"MIT\",\n};\nexport default arrayFlatAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayJoinAgent: AgentFunction<{ separator?: string; flat?: number }, { text: string }, { array: Array }> = async ({\n namedInputs,\n params,\n}) => {\n arrayValidate(\"arrayJoinAgent\", namedInputs);\n const separator = params.separator ?? \"\";\n const { flat } = params;\n\n const text = flat ? namedInputs.array.flat(flat).join(separator) : namedInputs.array.join(separator);\n return { text };\n};\n\nconst arrayJoinAgentInfo: AgentFunctionInfo = {\n name: \"arrayJoinAgent\",\n agent: arrayJoinAgent,\n mock: arrayJoinAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"array join\",\n },\n },\n required: [\"array\"],\n },\n params: {\n type: \"object\",\n properties: {\n separator: {\n type: \"string\",\n description: \"array join separator\",\n },\n flat: {\n type: \"number\",\n description: \"array flat depth\",\n },\n },\n },\n output: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"joined text\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n text: \"abc\",\n },\n },\n //\n {\n inputs: { array: [[1], [2], [3]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 2 },\n result: {\n text: \"1|2|3\",\n },\n },\n ],\n description: \"Array Join Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default arrayJoinAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent calculates the dot product of an array of vectors (A[]) and a vector (B),\n// typically used to calculate cosine similarity of embedding vectors.\n// Inputs:\n// matrix: Two dimentional array of numbers.\n// vector: One dimentional array of numbers.\n// Outputs:\n// { contents: Array } // array of docProduct of each vector (A[]) and vector B\nexport const dotProductAgent: AgentFunction, Array, { matrix: Array>; vector: Array }> = async ({\n namedInputs,\n}) => {\n assert(!!namedInputs, \"dotProductAgent: namedInputs is UNDEFINED!\");\n const matrix = namedInputs.matrix as Array>;\n const vector = namedInputs.vector as Array;\n if (matrix[0].length != vector.length) {\n throw new Error(`dotProduct: Length of vectors do not match. ${matrix[0].length}, ${vector.length}`);\n }\n const contents = matrix.map((vector0) => {\n return vector0.reduce((dotProduct: number, value, index) => {\n return dotProduct + value * vector[index];\n }, 0);\n });\n return contents;\n};\n\nconst dotProductAgentInfo: AgentFunctionInfo = {\n name: \"dotProductAgent\",\n agent: dotProductAgent,\n mock: dotProductAgent,\n inputs: {\n type: \"object\",\n properties: {\n matrix: {\n type: \"array\",\n description: \"two dimentional matrix\",\n items: {\n type: \"array\",\n items: {\n type: \"number\",\n },\n },\n },\n vector: {\n type: \"array\",\n description: \"the vector\",\n items: {\n type: \"number\",\n },\n },\n },\n required: [\"matrix\", \"vector\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n matrix: [\n [1, 2],\n [3, 4],\n [5, 6],\n ],\n vector: [3, 2],\n },\n params: {},\n result: [7, 17, 27],\n },\n {\n inputs: {\n matrix: [\n [1, 2],\n [2, 3],\n ],\n vector: [1, 2],\n },\n params: {},\n result: [5, 8],\n },\n ],\n description: \"dotProduct Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dotProductAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent returned a sorted array of one array (A) based on another array (B).\n// The default sorting order is \"decendant\".\n//\n// Parameters:\n// acendant: Specifies if the sorting order should be acendant. The default is \"false\" (decendant).\n// Inputs:\n// array: Array; // array to be sorted\n// values: Array; // array of numbers for sorting\n//\nexport const sortByValuesAgent: AgentFunction<\n {\n assendant?: boolean;\n },\n Array,\n {\n array: Array;\n values: Array;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"sortByValue: namedInputs is UNDEFINED!\");\n assert(!!namedInputs.array, \"sortByValue: namedInputs.array is UNDEFINED!\");\n assert(!!namedInputs.values, \"sortByValue: namedInputs.values is UNDEFINED!\");\n\n const direction = (params?.assendant ?? false) ? -1 : 1;\n const array: Array = namedInputs.array;\n const values: Array = namedInputs.values;\n const joined = array.map((item, index) => {\n return { item, value: values[index] };\n });\n const contents = joined\n .sort((a, b) => {\n return (b.value - a.value) * direction;\n })\n .map((a) => {\n return a.item;\n });\n return contents;\n};\n\nconst sortByValuesAgentInfo: AgentFunctionInfo = {\n name: \"sortByValuesAgent\",\n agent: sortByValuesAgent,\n mock: sortByValuesAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to sort\",\n },\n values: {\n type: \"array\",\n description: \"values associated with items in the array\",\n },\n },\n required: [\"array\", \"values\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {},\n result: [\"lemon\", \"orange\", \"apple\", \"banana\"],\n },\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {\n assendant: true,\n },\n result: [\"banana\", \"apple\", \"orange\", \"lemon\"],\n },\n ],\n description: \"sortByValues Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sortByValuesAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const echoAgent: AgentFunction = async ({ params, filterParams }) => {\n if (params.filterParams) {\n return filterParams;\n }\n return params;\n};\n\n// for test and document\nconst echoAgentInfo: AgentFunctionInfo = {\n name: \"echoAgent\",\n agent: echoAgent,\n mock: echoAgent,\n samples: [\n {\n inputs: {},\n params: { text: \"this is test\" },\n result: { text: \"this is test\" },\n },\n {\n inputs: {},\n params: {\n text: \"If you add filterParams option, it will respond to filterParams\",\n filterParams: true,\n },\n result: {},\n },\n ],\n description: \"Echo agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default echoAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const countingAgent: AgentFunction<{ count: number }, { list: number[] }> = async ({ params }) => {\n return {\n list: new Array(params.count).fill(undefined).map((_, i) => {\n return i;\n }),\n };\n};\n\n// for test and document\nconst countingAgentInfo: AgentFunctionInfo = {\n name: \"countingAgent\",\n agent: countingAgent,\n mock: countingAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4 },\n result: { list: [0, 1, 2, 3] },\n },\n ],\n description: \"Counting agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default countingAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const copyMessageAgent: AgentFunction<{ count: number; message: string }, { messages: string[] }> = async ({ params }) => {\n return {\n messages: new Array(params.count).fill(undefined).map(() => {\n return params.message;\n }),\n };\n};\n\n// for test and document\nconst copyMessageAgentInfo: AgentFunctionInfo = {\n name: \"copyMessageAgent\",\n agent: copyMessageAgent,\n mock: copyMessageAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4, message: \"hello\" },\n result: { messages: [\"hello\", \"hello\", \"hello\", \"hello\"] },\n },\n ],\n description: \"CopyMessage agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copyMessageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copy2ArrayAgent: AgentFunction<{ count: number }> = async ({ namedInputs, params }) => {\n assert(isNamedInputs(namedInputs), \"copy2ArrayAgent: namedInputs is UNDEFINED!\");\n const input = namedInputs.item ? namedInputs.item : namedInputs;\n return new Array(params.count).fill(undefined).map(() => {\n return input;\n });\n};\n\n// for test and document\nconst copy2ArrayAgentInfo: AgentFunctionInfo = {\n name: \"copy2ArrayAgent\",\n agent: copy2ArrayAgent,\n mock: copy2ArrayAgent,\n samples: [\n {\n inputs: { item: { message: \"hello\" } },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { message: \"hello\" },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { item: \"hello\" },\n params: { count: 10 },\n result: [\"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\"],\n },\n ],\n description: \"Copy2Array agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copy2ArrayAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const mergeNodeIdAgent: AgentFunction, { array: Record[] }> = async ({\n debugInfo: { nodeId },\n namedInputs,\n}) => {\n arrayValidate(\"mergeNodeIdAgent\", namedInputs);\n\n const dataSet = namedInputs.array;\n\n return dataSet.reduce(\n (tmp, input) => {\n return { ...tmp, ...input };\n },\n { [nodeId]: \"hello\" },\n );\n};\n\n// for test and document\nconst mergeNodeIdAgentInfo: AgentFunctionInfo = {\n name: \"mergeNodeIdAgent\",\n agent: mergeNodeIdAgent,\n mock: mergeNodeIdAgent,\n samples: [\n {\n inputs: { array: [{ message: \"hello\" }] },\n params: {},\n result: {\n message: \"hello\",\n test: \"hello\",\n },\n },\n ],\n description: \"merge node id agent\",\n category: [\"test\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default mergeNodeIdAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const streamMockAgent: AgentFunction = async ({ params, filterParams, namedInputs }) => {\n const message = params.message ?? namedInputs.message ?? \"\";\n\n for await (const token of message.split(\"\")) {\n if (filterParams.streamTokenCallback) {\n filterParams.streamTokenCallback(token);\n }\n await sleep(params.sleep || 100);\n }\n\n return { message };\n};\n\n// for test and document\nconst streamMockAgentInfo: AgentFunctionInfo = {\n name: \"streamMockAgent\",\n agent: streamMockAgent,\n mock: streamMockAgent,\n inputs: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n message: {\n type: \"string\",\n description: \"streaming message\",\n },\n },\n },\n {\n type: \"array\",\n },\n ],\n },\n samples: [\n {\n inputs: {},\n params: { message: \"this is params test\" },\n result: { message: \"this is params test\" },\n },\n {\n inputs: { message: \"this is named inputs test\" },\n params: {},\n result: { message: \"this is named inputs test\" },\n },\n ],\n description: \"Stream mock agent\",\n category: [\"test\"],\n author: \"Isamu Arimoto\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n stream: true,\n};\n\nexport default streamMockAgentInfo;\n","import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, StaticNodeData, GraphData } from \"graphai\";\nimport { GraphAI, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const nestedAgentGenerator: (graphData: GraphData) => (context: AgentFunctionContext) => Promise = (graphData: GraphData) => {\n return async (context: AgentFunctionContext) => {\n const { namedInputs, log, debugInfo, params, forNestedGraph } = context;\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n const throwError = params.throwError ?? false;\n if (taskManager) {\n const status = taskManager.getStatus(false);\n assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`);\n }\n assert(!!graphData, \"nestedAgent: graph is required\");\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n if (nodeIds.length > 0) {\n nodeIds.forEach((nodeId) => {\n if (nestedGraphData.nodes[nodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] };\n } else {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n (nestedGraphData.nodes[nodeId] as StaticNodeData)[\"value\"] = namedInputs[nodeId];\n }\n });\n }\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n\n const results = await graphAI.run(false);\n log?.push(...graphAI.transactionLogs());\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n };\n};\n\nexport const nestedAgent: AgentFunction<{ throwError?: boolean }> = async (context) => {\n const { forNestedGraph } = context;\n const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } };\n assert(!!graphData, \"No GraphData\");\n\n return await nestedAgentGenerator(graphData)(context);\n};\n\nconst nestedAgentInfo: AgentFunctionInfo = {\n name: \"nestedAgent\",\n agent: nestedAgent,\n mock: nestedAgent,\n samples: [\n {\n inputs: {\n message: \"hello\",\n },\n params: {},\n result: {\n test: [\"hello\"],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"messages\" },\n inputs: { messages: [\":message\"] },\n isResult: true,\n },\n },\n },\n },\n ],\n description: \"nested Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default nestedAgentInfo;\n","import { GraphAI, AgentFunction, AgentFunctionInfo, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const mapAgent: AgentFunction<\n {\n limit?: number;\n resultAll?: boolean;\n compositeResult?: boolean;\n throwError?: boolean;\n },\n Record\n> = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => {\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n\n if (taskManager) {\n const status = taskManager.getStatus();\n assert(status.concurrency > status.running, `mapAgent: Concurrency is too low: ${status.concurrency}`);\n }\n\n assert(!!namedInputs.rows, \"mapAgent: rows property is required in namedInput\");\n assert(!!graphData, \"mapAgent: graph is required\");\n\n const rows = namedInputs.rows.map((item: any) => item);\n if (params.limit && params.limit < rows.length) {\n rows.length = params.limit; // trim\n }\n const resultAll = params.resultAll ?? false;\n const throwError = params.throwError ?? false;\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n nestedGraphData.nodes[\"__mapIndex\"] = {};\n nodeIds.forEach((nodeId) => {\n const mappedNodeId = nodeId === \"rows\" ? \"row\" : nodeId;\n if (nestedGraphData.nodes[mappedNodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[mappedNodeId] = { value: namedInputs[nodeId] };\n } else if (!(\"agent\" in nestedGraphData.nodes[mappedNodeId])) {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n nestedGraphData.nodes[mappedNodeId][\"value\"] = namedInputs[nodeId];\n }\n });\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphs: Array = rows.map((row: any, index: number) => {\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n graphAI.injectValue(\"row\", row, \"__mapAgent_inputs__\");\n graphAI.injectValue(\"__mapIndex\", index, \"__mapAgent_inputs__\");\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n return graphAI;\n });\n\n const runs = graphs.map((graph) => {\n return graph.run(resultAll);\n });\n const results = await Promise.all(runs);\n const nodeIds = Object.keys(results[0]);\n // assert(nodeIds.length > 0, \"mapAgent: no return values (missing isResult)\");\n\n if (log) {\n const logs = graphs.map((graph, index) => {\n return graph.transactionLogs().map((log) => {\n log.mapIndex = index;\n return log;\n });\n });\n log.push(...logs.flat());\n }\n\n if (params.compositeResult) {\n const compositeResult = nodeIds.reduce((tmp: Record>, nodeId) => {\n tmp[nodeId] = results.map((result) => {\n return result[nodeId];\n });\n return tmp;\n }, {});\n return compositeResult;\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n};\n\nconst mapAgentInfo: AgentFunctionInfo = {\n name: \"mapAgent\",\n agent: mapAgent,\n mock: mapAgent,\n samples: [\n {\n inputs: {\n rows: [1, 2],\n },\n params: {},\n result: [{ test: [1] }, { test: [2] }],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${word}.\",\n },\n inputs: { word: \":row\" },\n isResult: true,\n },\n },\n },\n result: [\n { node2: \"I love apple.\" },\n { node2: \"I love orange.\" },\n { node2: \"I love banana.\" },\n { node2: \"I love lemon.\" },\n { node2: \"I love melon.\" },\n { node2: \"I love pineapple.\" },\n { node2: \"I love tomato.\" },\n ],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${item}.\",\n },\n inputs: { item: \":row.fruit\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"I love apple.\" }, { node2: \"I love orange.\" }],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n name: \"You\",\n verb: \"like\",\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"${name} ${verb} ${fruit}.\",\n },\n inputs: { fruit: \":row.fruit\", name: \":name\", verb: \":verb\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"You like apple.\" }, { node2: \"You like orange.\" }],\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n test: [1],\n row: 1,\n },\n {\n __mapIndex: 1,\n test: [2],\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n map: [\n {\n test: 1,\n },\n {\n test: 1,\n },\n ],\n row: 1,\n test: 1,\n },\n {\n __mapIndex: 1,\n map: [\n {\n test: 2,\n },\n {\n test: 2,\n },\n ],\n test: 2,\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n },\n },\n },\n },\n },\n },\n\n // old response\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${row}.\",\n },\n inputs: { row: \":row\" },\n isResult: true,\n },\n },\n },\n result: {\n node2: [\"I love apple.\", \"I love orange.\", \"I love banana.\", \"I love lemon.\", \"I love melon.\", \"I love pineapple.\", \"I love tomato.\"],\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n __mapIndex: [0, 1],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n __mapIndex: [0, 1],\n test: [[1], [2]],\n map: [\n {\n test: [[[1]], [[1]]],\n },\n {\n test: [[[2]], [[2]]],\n },\n ],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n },\n },\n },\n ],\n description: \"Map Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default mapAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const totalAgent: AgentFunction, Record, { array: Record[] }> = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((result, input) => {\n const inputArray = Array.isArray(input) ? input : [input];\n inputArray.forEach((innerInput) => {\n Object.keys(innerInput).forEach((key) => {\n const value = innerInput[key];\n if (result[key]) {\n result[key] += value;\n } else {\n result[key] = value;\n }\n });\n });\n return result;\n }, {});\n};\n\n//\nconst totalAgentInfo: AgentFunctionInfo = {\n name: \"totalAgent\",\n agent: totalAgent,\n mock: totalAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: { array: [[{ a: 1, b: -1 }, { c: 10 }], [{ a: 2, b: -1 }], [{ a: 3, b: -2 }, { d: -10 }]] },\n params: {},\n result: { a: 6, b: -4, c: 10, d: -10 },\n },\n {\n inputs: { array: [{ a: 1 }] },\n params: {},\n result: { a: 1 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }] },\n params: {},\n result: { a: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: {\n array: [\n { a: 1, b: 1 },\n { a: 2, b: 2 },\n { a: 3, b: 0 },\n ],\n },\n params: {},\n result: { a: 6, b: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2, b: 2 }, { a: 3, b: 0 }] },\n params: {},\n result: { a: 6, b: 2 },\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default totalAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const dataSumTemplateAgent: AgentFunction = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((tmp, input) => {\n return tmp + input;\n }, 0);\n};\n\nconst dataSumTemplateAgentInfo: AgentFunctionInfo = {\n name: \"dataSumTemplateAgent\",\n agent: dataSumTemplateAgent,\n mock: dataSumTemplateAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of numbers to calculate the sum of\",\n items: {\n type: \"integer\",\n },\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"number\",\n },\n samples: [\n {\n inputs: { array: [1] },\n params: {},\n result: 1,\n },\n {\n inputs: { array: [1, 2] },\n params: {},\n result: 3,\n },\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: 6,\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dataSumTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nconst applyFilter = (\n object: any,\n index: number,\n arrayInputs: any,\n include: Array | undefined,\n exclude: Array | undefined,\n alter: Record> | undefined,\n inject: Array> | undefined,\n swap: Record | undefined,\n inspect: Array> | undefined,\n) => {\n const propIds = include ? include : Object.keys(object);\n const excludeSet = new Set(exclude ?? []);\n const result = propIds.reduce((tmp: Record, propId) => {\n if (!excludeSet.has(propId)) {\n const mapping = alter && alter[propId];\n if (mapping && mapping[object[propId]]) {\n tmp[propId] = mapping[object[propId]];\n } else {\n tmp[propId] = object[propId];\n }\n }\n return tmp;\n }, {});\n\n if (inject) {\n inject.forEach((item) => {\n if (item.index === undefined || item.index === index) {\n result[item.propId] = arrayInputs[item.from];\n }\n });\n }\n if (inspect) {\n inspect.forEach((item) => {\n const value = arrayInputs[item.from ?? 1]; // default is arrayInputs[1]\n if (item.equal) {\n result[item.propId] = item.equal === value;\n } else if (item.notEqual) {\n result[item.propId] = item.notEqual !== value;\n }\n });\n }\n if (swap) {\n Object.keys(swap).forEach((key) => {\n const tmp = result[key];\n result[key] = result[swap[key]];\n result[swap[key]] = tmp;\n });\n }\n return result;\n};\n\nexport const propertyFilterAgent: AgentFunction<{\n include?: Array;\n exclude?: Array;\n alter?: Record>;\n inject?: Array>;\n inspect?: Array>;\n swap?: Record;\n}> = async ({ namedInputs, params }) => {\n const { include, exclude, alter, inject, swap, inspect } = params;\n const { array, item } = namedInputs;\n if (array) {\n // This is advanced usage, including \"inject\" and \"inspect\", which uses\n // array[1], array[2], ...\n const [target] = array; // Extract the first one\n if (Array.isArray(target)) {\n return target.map((item, index) => applyFilter(item, index, array, include, exclude, alter, inject, swap, inspect));\n }\n return applyFilter(target, 0, array, include, exclude, alter, inject, swap, inspect);\n } else if (item) {\n return applyFilter(item, 0, [], include, exclude, alter, inject, swap, inspect);\n }\n return false;\n};\n\nconst testInputs = {\n array: [\n [\n { color: \"red\", model: \"Model 3\", type: \"EV\", maker: \"Tesla\", range: 300 },\n { color: \"blue\", model: \"Model Y\", type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n \"Tesla Motors\",\n ],\n};\n\nconst propertyFilterAgentInfo: AgentFunctionInfo = {\n name: \"propertyFilterAgent\",\n agent: propertyFilterAgent,\n mock: propertyFilterAgent,\n inputs: {\n type: \"object\",\n },\n output: {\n type: \"any\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to apply filter\",\n },\n item: {\n type: \"object\",\n description: \"the object to apply filter\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [testInputs.array[0][0]] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: testInputs,\n params: { include: [\"color\", \"model\"] },\n result: [\n { color: \"red\", model: \"Model 3\" },\n { color: \"blue\", model: \"Model Y\" },\n ],\n },\n {\n inputs: testInputs,\n params: { exclude: [\"color\", \"model\"] },\n result: [\n { type: \"EV\", maker: \"Tesla\", range: 300 },\n { type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { exclude: [\"color\", \"model\"] },\n result: { type: \"EV\", maker: \"Tesla\", range: 300 },\n },\n {\n inputs: testInputs,\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: [\n {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n {\n color: \"red\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { swap: { maker: \"model\" } },\n result: [\n {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model Y\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { swap: { maker: \"model\" } },\n result: {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1, index: 0 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: {\n inspect: [\n { propId: \"isTesla\", equal: \"Tesla Motors\" }, // from: 1 is implied\n { propId: \"isGM\", notEqual: \"Tesla Motors\", from: 1 },\n ],\n },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n isTesla: true,\n isGM: false,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n isTesla: true,\n isGM: false,\n },\n ],\n },\n ],\n description: \"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default propertyFilterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copyAgent: AgentFunction<{\n namedKey?: string;\n}> = async ({ namedInputs, params }) => {\n const { namedKey } = params;\n assert(isNamedInputs(namedInputs), \"copyAgent: namedInputs is UNDEFINED!\");\n if (namedKey) {\n return namedInputs[namedKey];\n }\n return namedInputs;\n};\n\nconst copyAgentInfo: AgentFunctionInfo = {\n name: \"copyAgent\",\n agent: copyAgent,\n mock: copyAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n samples: [\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: {},\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { array: [\"Hello World\", \"Discarded\"] },\n params: {},\n result: { array: [\"Hello World\", \"Discarded\"] },\n },\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: { namedKey: \"color\" },\n result: \"red\",\n },\n ],\n description: \"Returns namedInputs\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default copyAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const vanillaFetchAgent: AgentFunction<{ debug?: boolean; type?: string; throwError?: boolean }, any, any> = async ({ namedInputs, params }) => {\n const { url, method, queryParams, headers, body } = namedInputs;\n const throwError = params.throwError ?? false;\n\n const url0 = new URL(url);\n const headers0 = headers ? { ...headers } : {};\n\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n url0.search = params.toString();\n }\n\n if (body) {\n headers0[\"Content-Type\"] = \"application/json\";\n }\n\n const fetchOptions: RequestInit = {\n method: (method ?? body) ? \"POST\" : \"GET\",\n headers: new Headers(headers0),\n body: body ? JSON.stringify(body) : undefined,\n };\n\n if (params?.debug) {\n return {\n url: url0.toString(),\n method: fetchOptions.method,\n headers: headers0,\n body: fetchOptions.body,\n };\n }\n\n const response = await fetch(url0.toString(), fetchOptions);\n\n if (!response.ok) {\n const status = response.status;\n const type = params?.type ?? \"json\";\n const error = type === \"json\" ? await response.json() : await response.text();\n if (throwError) {\n throw new Error(`HTTP error: ${status}`);\n }\n return {\n onError: {\n message: `HTTP error: ${status}`,\n status,\n error,\n },\n };\n }\n\n const result = await (async () => {\n const type = params?.type ?? \"json\";\n if (type === \"json\") {\n return await response.json();\n } else if (type === \"text\") {\n return response.text();\n }\n throw new Error(`Unknown Type! ${type}`);\n })();\n\n return result;\n};\n\nconst vanillaFetchAgentInfo: AgentFunctionInfo = {\n name: \"vanillaFetchAgent\",\n agent: vanillaFetchAgent,\n mock: vanillaFetchAgent,\n inputs: {\n type: \"object\",\n properties: {\n url: {\n type: \"string\",\n description: \"baseurl\",\n },\n method: {\n type: \"string\",\n description: \"HTTP method\",\n },\n headers: {\n type: \"object\",\n description: \"HTTP headers\",\n },\n quaryParams: {\n type: \"object\",\n description: \"Query parameters\",\n },\n body: {\n anyOf: [{ type: \"string\" }, { type: \"object\" }],\n description: \"body\",\n },\n },\n required: [\"url\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: { url: \"https://www.google.com\", queryParams: { foo: \"bar\" }, headers: { \"x-myHeader\": \"secret\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"GET\",\n url: \"https://www.google.com/?foo=bar\",\n headers: {\n \"x-myHeader\": \"secret\",\n },\n body: undefined,\n },\n },\n {\n inputs: { url: \"https://www.google.com\", body: { foo: \"bar\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"POST\",\n url: \"https://www.google.com/\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ foo: \"bar\" }),\n },\n },\n ],\n description: \"Retrieves JSON data from the specified URL\",\n category: [\"service\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default vanillaFetchAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const sleeperAgent: AgentFunction<{ duration?: number }> = async ({ params, namedInputs }) => {\n await sleep(params?.duration ?? 10);\n return namedInputs;\n};\n\nconst sleeperAgentInfo: AgentFunctionInfo = {\n name: \"sleeperAgent\",\n agent: sleeperAgent,\n mock: sleeperAgent,\n samples: [\n {\n inputs: {},\n params: { duration: 1 },\n result: {},\n },\n {\n inputs: { array: [{ a: 1 }, { b: 2 }] },\n params: { duration: 1 },\n result: {\n array: [{ a: 1 }, { b: 2 }],\n },\n },\n ],\n description: \"sleeper Agent\",\n category: [\"sleeper\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sleeperAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\ntype CompareDataItem = string | number | boolean | CompareData;\ntype CompareData = CompareDataItem[];\n\nconst compare = (_array: CompareData): boolean => {\n if (_array.length !== 3) {\n throw new Error(`compare inputs length must must be 3`);\n }\n const array = _array.map((value) => {\n if (Array.isArray(value)) {\n return compare(value);\n }\n return value;\n });\n const [a, operator, b] = array;\n if (operator === \"==\") {\n return a === b;\n }\n if (operator === \"!=\") {\n return a !== b;\n }\n if (operator === \">\") {\n return Number(a) > Number(b);\n }\n if (operator === \">=\") {\n return Number(a) >= Number(b);\n }\n if (operator === \"<\") {\n return Number(a) < Number(b);\n }\n if (operator === \"<=\") {\n return Number(a) <= Number(b);\n }\n if (operator === \"||\") {\n return !!a || !!b;\n }\n if (operator === \"&&\") {\n return !!a && !!b;\n }\n if (operator === \"XOR\") {\n return !!a === !b;\n }\n throw new Error(`unknown compare operator`);\n};\n\nexport const compareAgent: AgentFunction = async ({ namedInputs, params }) => {\n const ret = compare(namedInputs.array);\n if (params?.value) {\n return params?.value[ret ? \"true\" : \"false\"] ?? ret;\n }\n return ret;\n};\n\nconst compareAgentInfo: AgentFunctionInfo = {\n name: \"compareAgent\",\n agent: compareAgent,\n mock: compareAgent,\n inputs: {},\n output: {},\n samples: [\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"a\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abca\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"b\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abcd\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abc\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abcd\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"15\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">\", 15] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \">=\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 10\n inputs: { array: [\"10\", \">=\", \"19\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">=\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 19] },\n params: {},\n result: false,\n },\n //\n\n {\n inputs: { array: [\"10\", \"<\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<\", \"15\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<\", 15] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 20\n inputs: { array: [\"10\", \"<=\", \"19\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 19] },\n params: {},\n result: true,\n },\n\n {\n inputs: { array: [true, \"||\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"||\", false] },\n params: {},\n result: false,\n },\n\n {\n inputs: { array: [true, \"&&\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"&&\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [true, \"XOR\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"XOR\", true] },\n params: {},\n result: false,\n },\n //\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"||\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [[[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"bbb\", \"==\", \"bbb\"]], \"||\", [\"aaa\", \"&&\", \"bbb\"]] },\n params: {},\n result: true,\n },\n ],\n description: \"compare\",\n category: [\"compare\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default compareAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\n// https://platform.openai.com/docs/guides/vision\nconst getImageUrl = (data: string, imageType: string, detail?: string) => {\n if (imageType === \"http\") {\n return {\n url: data,\n };\n }\n const dataUrl = `data:image/${imageType};base64,${data}`;\n return {\n url: dataUrl,\n detail: detail ?? \"auto\",\n };\n};\n\ntype Content = { type: string; image_url: { url: string; detail?: string } } | { type: string; text: string };\n\nexport const images2messageAgent: AgentFunction<\n {\n imageType: string;\n detail?: string;\n },\n {\n message: {\n role: \"user\";\n content: Content[];\n };\n },\n {\n array: string[];\n prompt?: string;\n }\n> = async ({ namedInputs, params }) => {\n const { imageType, detail } = params;\n const { array, prompt } = namedInputs;\n arrayValidate(\"images2messageAgent\", namedInputs);\n assert(!!imageType, \"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...\");\n\n const contents: Content[] = array.map((base64ImageData) => {\n const image_url = getImageUrl(base64ImageData, imageType, detail);\n return {\n type: \"image_url\",\n image_url,\n };\n });\n\n if (prompt) {\n contents.unshift({ type: \"text\", text: prompt });\n }\n\n return {\n message: {\n role: \"user\",\n content: contents,\n },\n };\n};\n\nconst images2messageAgentInfo: AgentFunctionInfo = {\n name: \"images2messageAgent\",\n agent: images2messageAgent,\n mock: images2messageAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of base64 image data\",\n },\n prompt: {\n type: \"string\",\n description: \"prompt message\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [\"abcabc\", \"122123\"] },\n params: { imageType: \"png\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"abcabc\", \"122123\"], prompt: \"hello\" },\n params: { imageType: \"jpg\", detail: \"high\" },\n result: {\n message: {\n content: [\n {\n type: \"text\",\n text: \"hello\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"http://example.com/1.jpg\", \"http://example.com/2.jpg\"] },\n params: { imageType: \"http\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n url: \"http://example.com/1.jpg\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n url: \"http://example.com/2.jpg\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n ],\n description: \"Returns the message data for llm include image\",\n category: [\"image\"],\n author: \"Receptron team\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default images2messageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\n// Type for OpenAI's Embedding API\ninterface EmbeddingResponse {\n object: string;\n model: string;\n usage: {\n prompt_tokens: number;\n total_tokens: number;\n };\n data: [\n {\n object: string;\n index: number;\n embedding: number[];\n },\n ];\n}\n\nconst defaultEmbeddingModel = \"text-embedding-3-small\";\nconst OpenAI_embedding_API = \"https://api.openai.com/v1/embeddings\";\n\n// This agent retrieves embedding vectors for an array of strings using OpenAI's API\n//\n// Parameters:\n// model: Specifies the model (default is \"text-embedding-3-small\")\n// NamedInputs:\n// array: Array\n// item: string,\n// Result:\n// contents: Array>\n//\nexport const stringEmbeddingsAgent: AgentFunction<\n {\n model?: string;\n },\n number[][],\n { array: Array; item: string }\n> = async ({ params, namedInputs }) => {\n const { array, item } = namedInputs;\n\n const sources = array ?? [item];\n const apiKey = process.env.OPENAI_API_KEY;\n if (!apiKey) {\n throw new Error(\"OPENAI_API_KEY key is not set in environment variables.\");\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${apiKey}`,\n };\n\n const response = await fetch(OpenAI_embedding_API, {\n method: \"POST\",\n headers: headers,\n body: JSON.stringify({\n input: sources,\n model: params?.model ?? defaultEmbeddingModel,\n }),\n });\n const jsonResponse: EmbeddingResponse = await response.json();\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const embeddings = jsonResponse.data.map((object) => {\n return object.embedding;\n });\n return embeddings;\n};\n\nconst stringEmbeddingsAgentInfo: AgentFunctionInfo = {\n name: \"stringEmbeddingsAgent\",\n agent: stringEmbeddingsAgent,\n mock: stringEmbeddingsAgent,\n samples: [],\n description: \"Embeddings Agent\",\n category: [\"embedding\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringEmbeddingsAgentInfo;\n"],"names":["stringSplitterAgent","async","params","namedInputs","assert","source","text","chunkSize","overlap","Math","floor","count","length","contents","Array","fill","undefined","map","_","i","startIndex","substring","stringSplitterAgentInfo","name","agent","mock","inputs","type","properties","description","required","output","samples","result","category","author","repository","license","processTemplate","template","match","input","replace","isArray","item","isObject","Object","keys","reduce","tmp","key","stringTemplateAgent","console","warn","sampleNamedInput","message1","message2","stringTemplateAgentInfo","apple","lemon","row","version","nodes","ai","isResult","prompt","jsonParserAgent","data","JSON","stringify","parse","sample_object","json_str","md_json1","join","md_json2","md_json3","jsonParserAgentInfo","anyOf","stringCaseVariantsAgent","suffix","normalizedArray","trim","toLowerCase","split","push","normalized","lowerCamelCase","word","index","charAt","toUpperCase","slice","snakeCase","kebabCase","stringCaseVariantsAgentInfo","pushAgent","extra_message","arrayValidate","items","array","forEach","pushAgentInfo","banana","cacheType","popAgent","pop","popAgentInfo","array2","shiftAgent","shift","shiftAgentInfo","arrayFlatAgent","depth","flat","arrayFlatAgentInfo","arrayJoinAgent","separator","arrayJoinAgentInfo","dotProductAgent","matrix","vector","Error","vector0","dotProduct","value","dotProductAgentInfo","sortByValuesAgent","values","direction","assendant","sort","a","b","sortByValuesAgentInfo","echoAgent","filterParams","echoAgentInfo","countingAgent","list","countingAgentInfo","copyMessageAgent","messages","message","copyMessageAgentInfo","copy2ArrayAgent","isNamedInputs","copy2ArrayAgentInfo","mergeNodeIdAgent","debugInfo","nodeId","mergeNodeIdAgentInfo","test","streamMockAgent","token","streamTokenCallback","sleep","streamMockAgentInfo","stream","nestedAgent","context","forNestedGraph","graphData","log","agents","graphOptions","onLogCallback","taskManager","throwError","status","getStatus","concurrency","running","nestedGraphData","graphDataLatestVersion","nodeIds","graphAI","GraphAI","results","run","transactionLogs","error","onError","nestedAgentGenerator","nestedAgentInfo","graph","namedKey","mapAgent","rows","limit","resultAll","mappedNodeId","graphs","injectValue","runs","Promise","all","logs","mapIndex","compositeResult","mapAgentInfo","node2","fruit","verb","__mapIndex","totalAgent","innerInput","totalAgentInfo","c","d","dataSumTemplateAgent","dataSumTemplateAgentInfo","applyFilter","object","arrayInputs","include","exclude","alter","inject","swap","inspect","propIds","excludeSet","Set","propId","has","mapping","from","equal","notEqual","propertyFilterAgent","target","testInputs","color","model","maker","range","propertyFilterAgentInfo","red","blue","isTesla","isGM","copyAgent","copyAgentInfo","vanillaFetchAgent","url","method","queryParams","headers","body","url0","URL","headers0","URLSearchParams","search","toString","fetchOptions","Headers","debug","response","fetch","ok","json","vanillaFetchAgentInfo","quaryParams","foo","sleeperAgent","duration","sleeperAgentInfo","compare","_array","operator","Number","compareAgent","ret","compareAgentInfo","true","false","images2messageAgent","imageType","detail","base64ImageData","image_url","getImageUrl","unshift","role","content","images2messageAgentInfo","stringEmbeddingsAgent","sources","apiKey","process","env","OPENAI_API_KEY","Authorization","jsonResponse","embedding","stringEmbeddingsAgentInfo"],"mappings":"wEAUA,MAEaA,EAcTC,OAASC,SAAQC,kBACnBC,WAASD,EAAa,kDACtB,MAAME,EAASF,EAAYG,KACrBC,EAAYL,EAAOK,WAnBF,KAoBjBC,EAAUN,EAAOM,SAAWC,KAAKC,MAAMH,EAAY,GACnDI,EAAQF,KAAKC,MAAML,EAAOO,QAAUL,EAAYC,IAAY,EAMlE,MAAO,CAAEK,SALQ,IAAIC,MAAMH,GAAOI,UAAKC,GAAWC,KAAI,CAACC,EAAGC,KACxD,MAAMC,EAAaD,GAAKZ,EAAYC,GACpC,OAAOH,EAAOgB,UAAUD,EAAYA,EAAab,EAAU,IAG1CI,QAAOJ,YAAWC,UAAS,EA4B1Cc,EAA6C,CACjDC,KAAM,sBACNC,MAAOxB,EACPyB,KAAMzB,EACN0B,OAAQ,CACNC,KAAM,SACNC,WAAY,CACVtB,KAAM,CACJqB,KAAM,SACNE,YAAa,wBAGjBC,SAAU,CAAC,SAEbC,OAAQ,CACNJ,KAAM,SACNC,WAAY,CACVf,SAAU,CACRc,KAAM,QACNE,YAAa,4BAEflB,MAAO,CACLgB,KAAM,SACNE,YAAa,wBAEftB,UAAW,CACToB,KAAM,SACNE,YAAa,kBAEfrB,QAAS,CACPmB,KAAM,SACNE,YAAa,s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CACEJ,UAAW,CACTrC,IAAK,4BAEP1N,KAAM,aAER,CACE+P,UAAW,CACTrC,IAAK,4BAEP1N,KAAM,cAGVkQ,KAAM,WAKdhQ,YAAa,iDACbK,SAAU,CAAC,SACXC,OAAQ,iBACRC,WAAY,uCACZC,QAAS,OCpIE2P,GAMT/R,OAASC,SAAQC,kBACnB,MAAMiG,MAAEA,EAAKxD,KAAEA,GAASzC,EAElB8R,EAAU7L,GAAS,CAACxD,GACpBsP,EAASC,QAAQC,IAAIC,eAC3B,IAAKH,EACH,MAAM,IAAIxK,MAAM,2DAElB,MAAM8H,EAAU,CACd,eAAgB,mBAChB8C,cAAe,UAAUJ,KAGrB/B,QAAiBC,MA/BI,uCA+BwB,CACjDd,OAAQ,OACRE,QAASA,EACTC,KAAMrL,KAAKC,UAAU,CACnB5B,MAAOwP,EACPvD,MAAOxO,GAAQwO,OArCS,6BAwCtB6D,QAAwCpC,EAASG,OAEvD,IAAKH,EAASE,GACZ,MAAM,IAAI3I,MAAM,uBAAuByI,EAAS1F,UAKlD,OAHmB8H,EAAapO,KAAKlD,KAAKoM,GACjCA,EAAOmF,WAEC,EAGbC,GAA+C,CACnDlR,KAAM,wBACNC,MAAOwQ,GACPvQ,KAAMuQ,GACNhQ,QAAS,GACTH,YAAa,mBACbK,SAAU,CAAC,aACXC,OAAQ,iBACRC,WAAY,uCACZC,QAAS"} \ No newline at end of file +{"version":3,"file":"bundle.cjs.min.js","sources":["../src/string_agents/string_splitter_agent.ts","../src/string_agents/string_template_agent.ts","../src/string_agents/json_parser_agent.ts","../src/string_agents/string_case_variants_agent.ts","../src/graph_agents/nested_agent.ts","../src/string_agents/update_text_agent.ts","../src/array_agents/push_agent.ts","../src/array_agents/pop_agent.ts","../src/array_agents/shift_agent.ts","../src/array_agents/array_flat_agent.ts","../src/array_agents/array_join_agent.ts","../src/matrix_agents/dot_product_agent.ts","../src/matrix_agents/sort_by_values_agent.ts","../src/test_agents/echo_agent.ts","../src/test_agents/counting_agent.ts","../src/test_agents/copy_message_agent.ts","../src/test_agents/copy2array_agent.ts","../src/test_agents/merge_node_id_agent.ts","../src/test_agents/stream_mock_agent.ts","../src/graph_agents/map_agent.ts","../src/data_agents/total_agent.ts","../src/data_agents/data_sum_template_agent.ts","../src/data_agents/property_filter_agent.ts","../src/data_agents/copy_agent.ts","../src/service_agents/vanilla_fetch_agent.ts","../src/sleeper_agents/sleeper_agent.ts","../src/compare_agents/compare_agent.ts","../src/images_agents/image_to_message_agent.ts","../src/embedding_agent.ts"],"sourcesContent":["import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent strip one long string into chunks using following parameters\n//\n// chunkSize: number; // default is 2048\n// overlap: number; // default is 1/8th of chunkSize.\n//\n// see example\n// tests/agents/test_string_agent.ts\n//\nconst defaultChunkSize = 2048;\n\nexport const stringSplitterAgent: AgentFunction<\n {\n chunkSize?: number;\n overlap?: number;\n },\n {\n contents: Array;\n count: number;\n chunkSize: number;\n overlap: number;\n },\n {\n text: string;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"stringSplitterAgent: namedInputs is UNDEFINED!\");\n const source = namedInputs.text;\n const chunkSize = params.chunkSize ?? defaultChunkSize;\n const overlap = params.overlap ?? Math.floor(chunkSize / 8);\n const count = Math.floor(source.length / (chunkSize - overlap)) + 1;\n const contents = new Array(count).fill(undefined).map((_, i) => {\n const startIndex = i * (chunkSize - overlap);\n return source.substring(startIndex, startIndex + chunkSize);\n });\n\n return { contents, count, chunkSize, overlap };\n};\n\n// for test and document\nconst sampleInput = {\n text: \"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do.\",\n};\n\nconst sampleParams = { chunkSize: 64 };\nconst sampleResult = {\n contents: [\n \"Here's to the crazy ones, the misfits, the rebels, the troublema\",\n \"roublemakers, the round pegs in the square holes ... the ones wh\",\n \" ones who see things differently -- they're not fond of rules, a\",\n \"rules, and they have no respect for the status quo. ... You can \",\n \"You can quote them, disagree with them, glorify or vilify them, \",\n \"y them, but the only thing you can't do is ignore them because t\",\n \"ecause they change things. ... They push the human race forward,\",\n \"forward, and while some may see them as the crazy ones, we see g\",\n \"we see genius, because the people who are crazy enough to think \",\n \"o think that they can change the world, are the ones who do.\",\n \" do.\",\n ],\n count: 11,\n chunkSize: 64,\n overlap: 8,\n};\n\nconst stringSplitterAgentInfo: AgentFunctionInfo = {\n name: \"stringSplitterAgent\",\n agent: stringSplitterAgent,\n mock: stringSplitterAgent,\n inputs: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"text to be chuncked\",\n },\n },\n required: [\"text\"],\n },\n output: {\n type: \"object\",\n properties: {\n contents: {\n type: \"array\",\n description: \"the array of text chunks\",\n },\n count: {\n type: \"number\",\n description: \"the number of chunks\",\n },\n chunkSize: {\n type: \"number\",\n description: \"the chunk size\",\n },\n overlap: {\n type: \"number\",\n description: \"the overlap size\",\n },\n },\n },\n samples: [\n {\n inputs: sampleInput,\n params: sampleParams,\n result: sampleResult,\n },\n ],\n description: \"This agent strip one long string into chunks using following parameters\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringSplitterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, isObject } from \"graphai\";\n\ntype StringTemplate = string | Record;\ntype StringTemplateObject = StringTemplate | StringTemplate[] | Record;\n\nconst processTemplate: any = (template: StringTemplateObject, match: string, input: string) => {\n if (typeof template === \"string\") {\n if (template === match) {\n return input;\n }\n return template.replace(match, input);\n } else if (Array.isArray(template)) {\n return template.map((item: StringTemplate) => processTemplate(item, match, input));\n }\n\n if (isObject(template)) {\n return Object.keys(template).reduce((tmp: any, key: string) => {\n tmp[key] = processTemplate(template[key], match, input);\n return tmp;\n }, {});\n }\n return template;\n};\n\nexport const stringTemplateAgent: AgentFunction<\n {\n template: StringTemplateObject;\n },\n StringTemplateObject,\n Record\n> = async ({ params, namedInputs }) => {\n if (params.template === undefined) {\n if (namedInputs.text) {\n return namedInputs.text;\n }\n console.warn(\"warning: stringTemplateAgent no template\");\n }\n return Object.keys(namedInputs).reduce((template, key) => {\n return processTemplate(template, \"${\" + key + \"}\", namedInputs[key]);\n }, params.template);\n};\n\nconst sampleNamedInput = { message1: \"hello\", message2: \"test\" };\n\n// for test and document\nconst stringTemplateAgentInfo: AgentFunctionInfo = {\n name: \"stringTemplateAgent\",\n agent: stringTemplateAgent,\n mock: stringTemplateAgent,\n samples: [\n // named\n {\n inputs: sampleNamedInput,\n params: { template: \"${message1}: ${message2}\" },\n result: \"hello: test\",\n },\n {\n inputs: sampleNamedInput,\n params: { template: [\"${message1}: ${message2}\", \"${message2}: ${message1}\"] },\n result: [\"hello: test\", \"test: hello\"],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: \"${message2}\" } },\n result: { apple: \"hello\", lemon: \"test\" },\n },\n {\n inputs: sampleNamedInput,\n params: { template: [{ apple: \"${message1}\", lemon: \"${message2}\" }] },\n result: [{ apple: \"hello\", lemon: \"test\" }],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: [\"${message2}\"] } },\n result: { apple: \"hello\", lemon: [\"test\"] },\n },\n // graphData\n {\n inputs: { agent: \"openAiAgent\", row: \"hello world\", params: { text: \"message\" } },\n params: {\n template: {\n version: 0.5,\n nodes: {\n ai: {\n agent: \"${agent}\",\n isResult: true,\n params: \"${params}\",\n inputs: { prompt: \"${row}\" },\n },\n },\n },\n },\n result: {\n nodes: {\n ai: {\n agent: \"openAiAgent\",\n inputs: {\n prompt: \"hello world\",\n },\n isResult: true,\n params: { text: \"message\" },\n },\n },\n version: 0.5,\n },\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const jsonParserAgent: AgentFunction<\n null,\n unknown,\n {\n text: string;\n data: unknown;\n }\n> = async ({ namedInputs }) => {\n const { text, data } = namedInputs;\n\n if (data) {\n return JSON.stringify(data, null, 2);\n }\n const match = (\"\\n\" + text).match(/\\n```[a-zA-z]*([\\s\\S]*?)\\n```/);\n if (match) {\n return JSON.parse(match[1]);\n }\n return JSON.parse(text);\n};\n\nconst sample_object = { apple: \"red\", lemon: \"yellow\" };\n\nconst json_str = JSON.stringify(sample_object);\nconst md_json1 = [\"```\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json2 = [\"```json\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json3 = [\"```JSON\", json_str, \"```\"].join(\"\\n\");\n\nconst jsonParserAgentInfo: AgentFunctionInfo = {\n name: \"jsonParserAgent\",\n agent: jsonParserAgent,\n mock: jsonParserAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n type: \"string\",\n },\n samples: [\n {\n inputs: { data: sample_object },\n params: {},\n result: JSON.stringify(sample_object, null, 2),\n },\n {\n inputs: { text: JSON.stringify(sample_object, null, 2) },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json1 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json2 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json3 },\n params: {},\n result: sample_object,\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default jsonParserAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const stringCaseVariantsAgent: AgentFunction<\n { suffix?: string },\n { lowerCamelCase: string; snakeCase: string; kebabCase: string; normalized: string },\n { text: string }\n> = async ({ namedInputs, params }) => {\n const { suffix } = params;\n const normalizedArray = namedInputs.text\n .trim()\n .replace(/[\\s-_]+/g, \" \")\n .toLowerCase()\n .split(\" \");\n if (suffix && normalizedArray[normalizedArray.length - 1] !== suffix) {\n normalizedArray.push(suffix);\n }\n const normalized = normalizedArray.join(\" \");\n\n const lowerCamelCase = normalizedArray\n .map((word, index) => {\n if (index === 0) return word;\n return word.charAt(0).toUpperCase() + word.slice(1);\n })\n .join(\"\");\n\n const snakeCase = normalized.replace(/\\s+/g, \"_\");\n const kebabCase = normalized.replace(/\\s+/g, \"-\");\n\n return { lowerCamelCase, snakeCase, kebabCase, normalized };\n};\n\nconst stringCaseVariantsAgentInfo: AgentFunctionInfo = {\n name: \"stringCaseVariantsAgent\",\n agent: stringCaseVariantsAgent,\n mock: stringCaseVariantsAgent,\n samples: [\n {\n inputs: { text: \"this is a pen\" },\n params: {},\n result: {\n kebabCase: \"this-is-a-pen\",\n lowerCamelCase: \"thisIsAPen\",\n normalized: \"this is a pen\",\n snakeCase: \"this_is_a_pen\",\n },\n },\n {\n inputs: { text: \"string case variants\" },\n params: { suffix: \"agent\" },\n result: {\n kebabCase: \"string-case-variants-agent\",\n lowerCamelCase: \"stringCaseVariantsAgent\",\n normalized: \"string case variants agent\",\n snakeCase: \"string_case_variants_agent\",\n },\n },\n ],\n description: \"Format String Cases agent\",\n category: [\"string\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringCaseVariantsAgentInfo;\n","import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, StaticNodeData, GraphData } from \"graphai\";\nimport { GraphAI, assert, graphDataLatestVersion } from \"graphai\";\n\ntype NestedAgentGeneratorOption = {\n resultNodeId: string;\n};\nexport const nestedAgentGenerator: (graphData: GraphData, options?: NestedAgentGeneratorOption) => (context: AgentFunctionContext) => Promise = (\n graphData: GraphData,\n options?: NestedAgentGeneratorOption,\n) => {\n return async (context: AgentFunctionContext) => {\n const { namedInputs, log, debugInfo, params, forNestedGraph } = context;\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n const throwError = params.throwError ?? false;\n if (taskManager) {\n const status = taskManager.getStatus(false);\n assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`);\n }\n assert(!!graphData, \"nestedAgent: graph is required\");\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n if (nodeIds.length > 0) {\n nodeIds.forEach((nodeId) => {\n if (nestedGraphData.nodes[nodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] };\n } else {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n (nestedGraphData.nodes[nodeId] as StaticNodeData)[\"value\"] = namedInputs[nodeId];\n }\n });\n }\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n\n const results = await graphAI.run(false);\n log?.push(...graphAI.transactionLogs());\n\n if (options && options.resultNodeId) {\n return results[options.resultNodeId];\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n };\n};\n\nexport const nestedAgent: AgentFunction<{ throwError?: boolean }> = async (context) => {\n const { forNestedGraph } = context;\n const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } };\n assert(!!graphData, \"No GraphData\");\n\n return await nestedAgentGenerator(graphData)(context);\n};\n\nconst nestedAgentInfo: AgentFunctionInfo = {\n name: \"nestedAgent\",\n agent: nestedAgent,\n mock: nestedAgent,\n samples: [\n {\n inputs: {\n message: \"hello\",\n },\n params: {},\n result: {\n test: [\"hello\"],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"messages\" },\n inputs: { messages: [\":message\"] },\n isResult: true,\n },\n },\n },\n },\n ],\n description: \"nested Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default nestedAgentInfo;\n","import { nestedAgentGenerator } from \"@/generator\";\nimport { graphDataLatestVersion } from \"graphai\";\n\nconst updateTextGraph = {\n version: graphDataLatestVersion,\n nodes: {\n isNewText: {\n if: \":newText\",\n agent: \"copyAgent\",\n inputs: {\n text: \":newText\",\n },\n },\n isOldText: {\n unless: \":newText\",\n agent: \"copyAgent\",\n inputs: {\n text: \":oldText\",\n },\n },\n updatedText: {\n agent: \"copyAgent\",\n anyInput: true,\n inputs: {\n text: [\":isNewText.text\", \":isOldText.text\"],\n },\n },\n resultText: {\n isResult: true,\n agent: \"copyAgent\",\n anyInput: true,\n inputs: {\n text: \":updatedText.text.$0\",\n },\n },\n },\n};\n\nconst updateTextAgent = nestedAgentGenerator(updateTextGraph, { resultNodeId: \"resultText\" });\n\nconst updateTextAgentInfo = {\n name: \"updateTextAgent\",\n agent: updateTextAgent,\n mock: updateTextAgent,\n samples: [\n {\n inputs: { newText: \"new\", oldText: \"old\" },\n params: {},\n result: { text: \"new\" },\n },\n {\n inputs: { newText: \"\", oldText: \"old\" },\n params: {},\n result: { text: \"old\" },\n },\n ],\n description: \"\",\n category: [],\n author: \"\",\n repository: \"\",\n tools: [],\n license: \"\",\n hasGraphData: true,\n};\n\nexport default updateTextAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const pushAgent: AgentFunction }, { array: Array; item?: unknown; items: Array }> = async ({\n namedInputs,\n}) => {\n const extra_message = \" Set inputs: { array: :arrayNodeId, item: :itemNodeId }\";\n arrayValidate(\"pushAgent\", namedInputs, extra_message);\n const { item, items } = namedInputs;\n assert(!!(item || items), \"pushAgent: namedInputs.item is UNDEFINED!\" + extra_message);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n if (item) {\n array.push(item);\n } else {\n items.forEach((item) => {\n array.push(item);\n });\n }\n return {\n array,\n };\n};\n\nconst pushAgentInfo: AgentFunctionInfo = {\n name: \"pushAgent\",\n agent: pushAgent,\n mock: pushAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to push an item to\",\n },\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n items: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2], item: 3 },\n params: {},\n result: { array: [1, 2, 3] },\n },\n {\n inputs: { array: [{ apple: 1 }], item: { lemon: 2 } },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }] },\n },\n {\n inputs: { array: [{ apple: 1 }], items: [{ lemon: 2 }, { banana: 3 }] },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }, { banana: 3 }] },\n },\n ],\n description: \"push Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default pushAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const popAgent: AgentFunction; item: unknown }, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"popAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.pop();\n return { array, item };\n};\n\nconst popAgentInfo: AgentFunctionInfo = {\n name: \"popAgent\",\n agent: popAgent,\n mock: popAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to pop an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item popped from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"a\", \"b\"],\n item: \"c\",\n },\n },\n {\n inputs: {\n array: [1, 2, 3],\n array2: [\"a\", \"b\", \"c\"],\n },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n ],\n description: \"Pop Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default popAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const shiftAgent: AgentFunction, Record, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"shiftAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.shift();\n return { array, item };\n};\n\nconst shiftAgentInfo: AgentFunctionInfo = {\n name: \"shiftAgent\",\n agent: shiftAgent,\n mock: shiftAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to shift an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item shifted from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [2, 3],\n item: 1,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"b\", \"c\"],\n item: \"a\",\n },\n },\n ],\n description: \"shift Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default shiftAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayFlatAgent: AgentFunction<{ depth?: number }, { array: Array }, { array: Array }> = async ({ namedInputs, params }) => {\n arrayValidate(\"arrayFlatAgent\", namedInputs);\n const depth = params.depth ?? 1;\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n return { array: array.flat(depth) };\n};\n\nconst arrayFlatAgentInfo: AgentFunctionInfo = {\n name: \"arrayFlatAgent\",\n agent: arrayFlatAgent,\n mock: arrayFlatAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"flat array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n params: {\n type: \"object\",\n properties: {\n depth: {\n type: \"number\",\n description: \"array depth\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n array: [1, 2, [3]],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: { depth: 2 },\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n array: [\"a\", \"b\", \"c\"],\n },\n },\n ],\n description: \"Array Flat Agent\",\n category: [\"array\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n cacheType: \"pureAgent\",\n license: \"MIT\",\n};\nexport default arrayFlatAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayJoinAgent: AgentFunction<{ separator?: string; flat?: number }, { text: string }, { array: Array }> = async ({\n namedInputs,\n params,\n}) => {\n arrayValidate(\"arrayJoinAgent\", namedInputs);\n const separator = params.separator ?? \"\";\n const { flat } = params;\n\n const text = flat ? namedInputs.array.flat(flat).join(separator) : namedInputs.array.join(separator);\n return { text };\n};\n\nconst arrayJoinAgentInfo: AgentFunctionInfo = {\n name: \"arrayJoinAgent\",\n agent: arrayJoinAgent,\n mock: arrayJoinAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"array join\",\n },\n },\n required: [\"array\"],\n },\n params: {\n type: \"object\",\n properties: {\n separator: {\n type: \"string\",\n description: \"array join separator\",\n },\n flat: {\n type: \"number\",\n description: \"array flat depth\",\n },\n },\n },\n output: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"joined text\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n text: \"abc\",\n },\n },\n //\n {\n inputs: { array: [[1], [2], [3]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 2 },\n result: {\n text: \"1|2|3\",\n },\n },\n ],\n description: \"Array Join Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default arrayJoinAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent calculates the dot product of an array of vectors (A[]) and a vector (B),\n// typically used to calculate cosine similarity of embedding vectors.\n// Inputs:\n// matrix: Two dimentional array of numbers.\n// vector: One dimentional array of numbers.\n// Outputs:\n// { contents: Array } // array of docProduct of each vector (A[]) and vector B\nexport const dotProductAgent: AgentFunction, Array, { matrix: Array>; vector: Array }> = async ({\n namedInputs,\n}) => {\n assert(!!namedInputs, \"dotProductAgent: namedInputs is UNDEFINED!\");\n const matrix = namedInputs.matrix as Array>;\n const vector = namedInputs.vector as Array;\n if (matrix[0].length != vector.length) {\n throw new Error(`dotProduct: Length of vectors do not match. ${matrix[0].length}, ${vector.length}`);\n }\n const contents = matrix.map((vector0) => {\n return vector0.reduce((dotProduct: number, value, index) => {\n return dotProduct + value * vector[index];\n }, 0);\n });\n return contents;\n};\n\nconst dotProductAgentInfo: AgentFunctionInfo = {\n name: \"dotProductAgent\",\n agent: dotProductAgent,\n mock: dotProductAgent,\n inputs: {\n type: \"object\",\n properties: {\n matrix: {\n type: \"array\",\n description: \"two dimentional matrix\",\n items: {\n type: \"array\",\n items: {\n type: \"number\",\n },\n },\n },\n vector: {\n type: \"array\",\n description: \"the vector\",\n items: {\n type: \"number\",\n },\n },\n },\n required: [\"matrix\", \"vector\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n matrix: [\n [1, 2],\n [3, 4],\n [5, 6],\n ],\n vector: [3, 2],\n },\n params: {},\n result: [7, 17, 27],\n },\n {\n inputs: {\n matrix: [\n [1, 2],\n [2, 3],\n ],\n vector: [1, 2],\n },\n params: {},\n result: [5, 8],\n },\n ],\n description: \"dotProduct Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dotProductAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent returned a sorted array of one array (A) based on another array (B).\n// The default sorting order is \"decendant\".\n//\n// Parameters:\n// acendant: Specifies if the sorting order should be acendant. The default is \"false\" (decendant).\n// Inputs:\n// array: Array; // array to be sorted\n// values: Array; // array of numbers for sorting\n//\nexport const sortByValuesAgent: AgentFunction<\n {\n assendant?: boolean;\n },\n Array,\n {\n array: Array;\n values: Array;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"sortByValue: namedInputs is UNDEFINED!\");\n assert(!!namedInputs.array, \"sortByValue: namedInputs.array is UNDEFINED!\");\n assert(!!namedInputs.values, \"sortByValue: namedInputs.values is UNDEFINED!\");\n\n const direction = (params?.assendant ?? false) ? -1 : 1;\n const array: Array = namedInputs.array;\n const values: Array = namedInputs.values;\n const joined = array.map((item, index) => {\n return { item, value: values[index] };\n });\n const contents = joined\n .sort((a, b) => {\n return (b.value - a.value) * direction;\n })\n .map((a) => {\n return a.item;\n });\n return contents;\n};\n\nconst sortByValuesAgentInfo: AgentFunctionInfo = {\n name: \"sortByValuesAgent\",\n agent: sortByValuesAgent,\n mock: sortByValuesAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to sort\",\n },\n values: {\n type: \"array\",\n description: \"values associated with items in the array\",\n },\n },\n required: [\"array\", \"values\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {},\n result: [\"lemon\", \"orange\", \"apple\", \"banana\"],\n },\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {\n assendant: true,\n },\n result: [\"banana\", \"apple\", \"orange\", \"lemon\"],\n },\n ],\n description: \"sortByValues Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sortByValuesAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const echoAgent: AgentFunction = async ({ params, filterParams }) => {\n if (params.filterParams) {\n return filterParams;\n }\n return params;\n};\n\n// for test and document\nconst echoAgentInfo: AgentFunctionInfo = {\n name: \"echoAgent\",\n agent: echoAgent,\n mock: echoAgent,\n samples: [\n {\n inputs: {},\n params: { text: \"this is test\" },\n result: { text: \"this is test\" },\n },\n {\n inputs: {},\n params: {\n text: \"If you add filterParams option, it will respond to filterParams\",\n filterParams: true,\n },\n result: {},\n },\n ],\n description: \"Echo agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default echoAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const countingAgent: AgentFunction<{ count: number }, { list: number[] }> = async ({ params }) => {\n return {\n list: new Array(params.count).fill(undefined).map((_, i) => {\n return i;\n }),\n };\n};\n\n// for test and document\nconst countingAgentInfo: AgentFunctionInfo = {\n name: \"countingAgent\",\n agent: countingAgent,\n mock: countingAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4 },\n result: { list: [0, 1, 2, 3] },\n },\n ],\n description: \"Counting agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default countingAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const copyMessageAgent: AgentFunction<{ count: number; message: string }, { messages: string[] }> = async ({ params }) => {\n return {\n messages: new Array(params.count).fill(undefined).map(() => {\n return params.message;\n }),\n };\n};\n\n// for test and document\nconst copyMessageAgentInfo: AgentFunctionInfo = {\n name: \"copyMessageAgent\",\n agent: copyMessageAgent,\n mock: copyMessageAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4, message: \"hello\" },\n result: { messages: [\"hello\", \"hello\", \"hello\", \"hello\"] },\n },\n ],\n description: \"CopyMessage agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copyMessageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copy2ArrayAgent: AgentFunction<{ count: number }> = async ({ namedInputs, params }) => {\n assert(isNamedInputs(namedInputs), \"copy2ArrayAgent: namedInputs is UNDEFINED!\");\n const input = namedInputs.item ? namedInputs.item : namedInputs;\n return new Array(params.count).fill(undefined).map(() => {\n return input;\n });\n};\n\n// for test and document\nconst copy2ArrayAgentInfo: AgentFunctionInfo = {\n name: \"copy2ArrayAgent\",\n agent: copy2ArrayAgent,\n mock: copy2ArrayAgent,\n samples: [\n {\n inputs: { item: { message: \"hello\" } },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { message: \"hello\" },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { item: \"hello\" },\n params: { count: 10 },\n result: [\"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\"],\n },\n ],\n description: \"Copy2Array agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copy2ArrayAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const mergeNodeIdAgent: AgentFunction, { array: Record[] }> = async ({\n debugInfo: { nodeId },\n namedInputs,\n}) => {\n arrayValidate(\"mergeNodeIdAgent\", namedInputs);\n\n const dataSet = namedInputs.array;\n\n return dataSet.reduce(\n (tmp, input) => {\n return { ...tmp, ...input };\n },\n { [nodeId]: \"hello\" },\n );\n};\n\n// for test and document\nconst mergeNodeIdAgentInfo: AgentFunctionInfo = {\n name: \"mergeNodeIdAgent\",\n agent: mergeNodeIdAgent,\n mock: mergeNodeIdAgent,\n samples: [\n {\n inputs: { array: [{ message: \"hello\" }] },\n params: {},\n result: {\n message: \"hello\",\n test: \"hello\",\n },\n },\n ],\n description: \"merge node id agent\",\n category: [\"test\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default mergeNodeIdAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const streamMockAgent: AgentFunction = async ({ params, filterParams, namedInputs }) => {\n const message = params.message ?? namedInputs.message ?? \"\";\n\n for await (const token of message.split(\"\")) {\n if (filterParams.streamTokenCallback) {\n filterParams.streamTokenCallback(token);\n }\n await sleep(params.sleep || 100);\n }\n\n return { message };\n};\n\n// for test and document\nconst streamMockAgentInfo: AgentFunctionInfo = {\n name: \"streamMockAgent\",\n agent: streamMockAgent,\n mock: streamMockAgent,\n inputs: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n message: {\n type: \"string\",\n description: \"streaming message\",\n },\n },\n },\n {\n type: \"array\",\n },\n ],\n },\n samples: [\n {\n inputs: {},\n params: { message: \"this is params test\" },\n result: { message: \"this is params test\" },\n },\n {\n inputs: { message: \"this is named inputs test\" },\n params: {},\n result: { message: \"this is named inputs test\" },\n },\n ],\n description: \"Stream mock agent\",\n category: [\"test\"],\n author: \"Isamu Arimoto\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n stream: true,\n};\n\nexport default streamMockAgentInfo;\n","import { GraphAI, AgentFunction, AgentFunctionInfo, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const mapAgent: AgentFunction<\n {\n limit?: number;\n resultAll?: boolean;\n compositeResult?: boolean;\n throwError?: boolean;\n },\n Record\n> = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => {\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n\n if (taskManager) {\n const status = taskManager.getStatus();\n assert(status.concurrency > status.running, `mapAgent: Concurrency is too low: ${status.concurrency}`);\n }\n\n assert(!!namedInputs.rows, \"mapAgent: rows property is required in namedInput\");\n assert(!!graphData, \"mapAgent: graph is required\");\n\n const rows = namedInputs.rows.map((item: any) => item);\n if (params.limit && params.limit < rows.length) {\n rows.length = params.limit; // trim\n }\n const resultAll = params.resultAll ?? false;\n const throwError = params.throwError ?? false;\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n nestedGraphData.nodes[\"__mapIndex\"] = {};\n nodeIds.forEach((nodeId) => {\n const mappedNodeId = nodeId === \"rows\" ? \"row\" : nodeId;\n if (nestedGraphData.nodes[mappedNodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[mappedNodeId] = { value: namedInputs[nodeId] };\n } else if (!(\"agent\" in nestedGraphData.nodes[mappedNodeId])) {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n nestedGraphData.nodes[mappedNodeId][\"value\"] = namedInputs[nodeId];\n }\n });\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphs: Array = rows.map((row: any, index: number) => {\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n graphAI.injectValue(\"row\", row, \"__mapAgent_inputs__\");\n graphAI.injectValue(\"__mapIndex\", index, \"__mapAgent_inputs__\");\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n return graphAI;\n });\n\n const runs = graphs.map((graph) => {\n return graph.run(resultAll);\n });\n const results = await Promise.all(runs);\n const nodeIds = Object.keys(results[0]);\n // assert(nodeIds.length > 0, \"mapAgent: no return values (missing isResult)\");\n\n if (log) {\n const logs = graphs.map((graph, index) => {\n return graph.transactionLogs().map((log) => {\n log.mapIndex = index;\n return log;\n });\n });\n log.push(...logs.flat());\n }\n\n if (params.compositeResult) {\n const compositeResult = nodeIds.reduce((tmp: Record>, nodeId) => {\n tmp[nodeId] = results.map((result) => {\n return result[nodeId];\n });\n return tmp;\n }, {});\n return compositeResult;\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n};\n\nconst mapAgentInfo: AgentFunctionInfo = {\n name: \"mapAgent\",\n agent: mapAgent,\n mock: mapAgent,\n samples: [\n {\n inputs: {\n rows: [1, 2],\n },\n params: {},\n result: [{ test: [1] }, { test: [2] }],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${word}.\",\n },\n inputs: { word: \":row\" },\n isResult: true,\n },\n },\n },\n result: [\n { node2: \"I love apple.\" },\n { node2: \"I love orange.\" },\n { node2: \"I love banana.\" },\n { node2: \"I love lemon.\" },\n { node2: \"I love melon.\" },\n { node2: \"I love pineapple.\" },\n { node2: \"I love tomato.\" },\n ],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${item}.\",\n },\n inputs: { item: \":row.fruit\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"I love apple.\" }, { node2: \"I love orange.\" }],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n name: \"You\",\n verb: \"like\",\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"${name} ${verb} ${fruit}.\",\n },\n inputs: { fruit: \":row.fruit\", name: \":name\", verb: \":verb\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"You like apple.\" }, { node2: \"You like orange.\" }],\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n test: [1],\n row: 1,\n },\n {\n __mapIndex: 1,\n test: [2],\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n map: [\n {\n test: 1,\n },\n {\n test: 1,\n },\n ],\n row: 1,\n test: 1,\n },\n {\n __mapIndex: 1,\n map: [\n {\n test: 2,\n },\n {\n test: 2,\n },\n ],\n test: 2,\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n },\n },\n },\n },\n },\n },\n\n // old response\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${row}.\",\n },\n inputs: { row: \":row\" },\n isResult: true,\n },\n },\n },\n result: {\n node2: [\"I love apple.\", \"I love orange.\", \"I love banana.\", \"I love lemon.\", \"I love melon.\", \"I love pineapple.\", \"I love tomato.\"],\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n __mapIndex: [0, 1],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n __mapIndex: [0, 1],\n test: [[1], [2]],\n map: [\n {\n test: [[[1]], [[1]]],\n },\n {\n test: [[[2]], [[2]]],\n },\n ],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n },\n },\n },\n ],\n description: \"Map Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default mapAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const totalAgent: AgentFunction, Record, { array: Record[] }> = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((result, input) => {\n const inputArray = Array.isArray(input) ? input : [input];\n inputArray.forEach((innerInput) => {\n Object.keys(innerInput).forEach((key) => {\n const value = innerInput[key];\n if (result[key]) {\n result[key] += value;\n } else {\n result[key] = value;\n }\n });\n });\n return result;\n }, {});\n};\n\n//\nconst totalAgentInfo: AgentFunctionInfo = {\n name: \"totalAgent\",\n agent: totalAgent,\n mock: totalAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: { array: [[{ a: 1, b: -1 }, { c: 10 }], [{ a: 2, b: -1 }], [{ a: 3, b: -2 }, { d: -10 }]] },\n params: {},\n result: { a: 6, b: -4, c: 10, d: -10 },\n },\n {\n inputs: { array: [{ a: 1 }] },\n params: {},\n result: { a: 1 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }] },\n params: {},\n result: { a: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: {\n array: [\n { a: 1, b: 1 },\n { a: 2, b: 2 },\n { a: 3, b: 0 },\n ],\n },\n params: {},\n result: { a: 6, b: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2, b: 2 }, { a: 3, b: 0 }] },\n params: {},\n result: { a: 6, b: 2 },\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default totalAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const dataSumTemplateAgent: AgentFunction = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((tmp, input) => {\n return tmp + input;\n }, 0);\n};\n\nconst dataSumTemplateAgentInfo: AgentFunctionInfo = {\n name: \"dataSumTemplateAgent\",\n agent: dataSumTemplateAgent,\n mock: dataSumTemplateAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of numbers to calculate the sum of\",\n items: {\n type: \"integer\",\n },\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"number\",\n },\n samples: [\n {\n inputs: { array: [1] },\n params: {},\n result: 1,\n },\n {\n inputs: { array: [1, 2] },\n params: {},\n result: 3,\n },\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: 6,\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dataSumTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nconst applyFilter = (\n object: any,\n index: number,\n arrayInputs: any,\n include: Array | undefined,\n exclude: Array | undefined,\n alter: Record> | undefined,\n inject: Array> | undefined,\n swap: Record | undefined,\n inspect: Array> | undefined,\n) => {\n const propIds = include ? include : Object.keys(object);\n const excludeSet = new Set(exclude ?? []);\n const result = propIds.reduce((tmp: Record, propId) => {\n if (!excludeSet.has(propId)) {\n const mapping = alter && alter[propId];\n if (mapping && mapping[object[propId]]) {\n tmp[propId] = mapping[object[propId]];\n } else {\n tmp[propId] = object[propId];\n }\n }\n return tmp;\n }, {});\n\n if (inject) {\n inject.forEach((item) => {\n if (item.index === undefined || item.index === index) {\n result[item.propId] = arrayInputs[item.from];\n }\n });\n }\n if (inspect) {\n inspect.forEach((item) => {\n const value = arrayInputs[item.from ?? 1]; // default is arrayInputs[1]\n if (item.equal) {\n result[item.propId] = item.equal === value;\n } else if (item.notEqual) {\n result[item.propId] = item.notEqual !== value;\n }\n });\n }\n if (swap) {\n Object.keys(swap).forEach((key) => {\n const tmp = result[key];\n result[key] = result[swap[key]];\n result[swap[key]] = tmp;\n });\n }\n return result;\n};\n\nexport const propertyFilterAgent: AgentFunction<{\n include?: Array;\n exclude?: Array;\n alter?: Record>;\n inject?: Array>;\n inspect?: Array>;\n swap?: Record;\n}> = async ({ namedInputs, params }) => {\n const { include, exclude, alter, inject, swap, inspect } = params;\n const { array, item } = namedInputs;\n if (array) {\n // This is advanced usage, including \"inject\" and \"inspect\", which uses\n // array[1], array[2], ...\n const [target] = array; // Extract the first one\n if (Array.isArray(target)) {\n return target.map((item, index) => applyFilter(item, index, array, include, exclude, alter, inject, swap, inspect));\n }\n return applyFilter(target, 0, array, include, exclude, alter, inject, swap, inspect);\n } else if (item) {\n return applyFilter(item, 0, [], include, exclude, alter, inject, swap, inspect);\n }\n return false;\n};\n\nconst testInputs = {\n array: [\n [\n { color: \"red\", model: \"Model 3\", type: \"EV\", maker: \"Tesla\", range: 300 },\n { color: \"blue\", model: \"Model Y\", type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n \"Tesla Motors\",\n ],\n};\n\nconst propertyFilterAgentInfo: AgentFunctionInfo = {\n name: \"propertyFilterAgent\",\n agent: propertyFilterAgent,\n mock: propertyFilterAgent,\n inputs: {\n type: \"object\",\n },\n output: {\n type: \"any\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to apply filter\",\n },\n item: {\n type: \"object\",\n description: \"the object to apply filter\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [testInputs.array[0][0]] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: testInputs,\n params: { include: [\"color\", \"model\"] },\n result: [\n { color: \"red\", model: \"Model 3\" },\n { color: \"blue\", model: \"Model Y\" },\n ],\n },\n {\n inputs: testInputs,\n params: { exclude: [\"color\", \"model\"] },\n result: [\n { type: \"EV\", maker: \"Tesla\", range: 300 },\n { type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { exclude: [\"color\", \"model\"] },\n result: { type: \"EV\", maker: \"Tesla\", range: 300 },\n },\n {\n inputs: testInputs,\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: [\n {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n {\n color: \"red\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { swap: { maker: \"model\" } },\n result: [\n {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model Y\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { swap: { maker: \"model\" } },\n result: {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1, index: 0 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: {\n inspect: [\n { propId: \"isTesla\", equal: \"Tesla Motors\" }, // from: 1 is implied\n { propId: \"isGM\", notEqual: \"Tesla Motors\", from: 1 },\n ],\n },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n isTesla: true,\n isGM: false,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n isTesla: true,\n isGM: false,\n },\n ],\n },\n ],\n description: \"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default propertyFilterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copyAgent: AgentFunction<{\n namedKey?: string;\n}> = async ({ namedInputs, params }) => {\n const { namedKey } = params;\n assert(isNamedInputs(namedInputs), \"copyAgent: namedInputs is UNDEFINED!\");\n if (namedKey) {\n return namedInputs[namedKey];\n }\n return namedInputs;\n};\n\nconst copyAgentInfo: AgentFunctionInfo = {\n name: \"copyAgent\",\n agent: copyAgent,\n mock: copyAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n samples: [\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: {},\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { array: [\"Hello World\", \"Discarded\"] },\n params: {},\n result: { array: [\"Hello World\", \"Discarded\"] },\n },\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: { namedKey: \"color\" },\n result: \"red\",\n },\n ],\n description: \"Returns namedInputs\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default copyAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const vanillaFetchAgent: AgentFunction<{ debug?: boolean; type?: string; throwError?: boolean }, any, any> = async ({ namedInputs, params }) => {\n const { url, method, queryParams, headers, body } = namedInputs;\n const throwError = params.throwError ?? false;\n\n const url0 = new URL(url);\n const headers0 = headers ? { ...headers } : {};\n\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n url0.search = params.toString();\n }\n\n if (body) {\n headers0[\"Content-Type\"] = \"application/json\";\n }\n\n const fetchOptions: RequestInit = {\n method: (method ?? body) ? \"POST\" : \"GET\",\n headers: new Headers(headers0),\n body: body ? JSON.stringify(body) : undefined,\n };\n\n if (params?.debug) {\n return {\n url: url0.toString(),\n method: fetchOptions.method,\n headers: headers0,\n body: fetchOptions.body,\n };\n }\n\n const response = await fetch(url0.toString(), fetchOptions);\n\n if (!response.ok) {\n const status = response.status;\n const type = params?.type ?? \"json\";\n const error = type === \"json\" ? await response.json() : await response.text();\n if (throwError) {\n throw new Error(`HTTP error: ${status}`);\n }\n return {\n onError: {\n message: `HTTP error: ${status}`,\n status,\n error,\n },\n };\n }\n\n const result = await (async () => {\n const type = params?.type ?? \"json\";\n if (type === \"json\") {\n return await response.json();\n } else if (type === \"text\") {\n return response.text();\n }\n throw new Error(`Unknown Type! ${type}`);\n })();\n\n return result;\n};\n\nconst vanillaFetchAgentInfo: AgentFunctionInfo = {\n name: \"vanillaFetchAgent\",\n agent: vanillaFetchAgent,\n mock: vanillaFetchAgent,\n inputs: {\n type: \"object\",\n properties: {\n url: {\n type: \"string\",\n description: \"baseurl\",\n },\n method: {\n type: \"string\",\n description: \"HTTP method\",\n },\n headers: {\n type: \"object\",\n description: \"HTTP headers\",\n },\n quaryParams: {\n type: \"object\",\n description: \"Query parameters\",\n },\n body: {\n anyOf: [{ type: \"string\" }, { type: \"object\" }],\n description: \"body\",\n },\n },\n required: [\"url\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: { url: \"https://www.google.com\", queryParams: { foo: \"bar\" }, headers: { \"x-myHeader\": \"secret\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"GET\",\n url: \"https://www.google.com/?foo=bar\",\n headers: {\n \"x-myHeader\": \"secret\",\n },\n body: undefined,\n },\n },\n {\n inputs: { url: \"https://www.google.com\", body: { foo: \"bar\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"POST\",\n url: \"https://www.google.com/\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ foo: \"bar\" }),\n },\n },\n ],\n description: \"Retrieves JSON data from the specified URL\",\n category: [\"service\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default vanillaFetchAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const sleeperAgent: AgentFunction<{ duration?: number }> = async ({ params, namedInputs }) => {\n await sleep(params?.duration ?? 10);\n return namedInputs;\n};\n\nconst sleeperAgentInfo: AgentFunctionInfo = {\n name: \"sleeperAgent\",\n agent: sleeperAgent,\n mock: sleeperAgent,\n samples: [\n {\n inputs: {},\n params: { duration: 1 },\n result: {},\n },\n {\n inputs: { array: [{ a: 1 }, { b: 2 }] },\n params: { duration: 1 },\n result: {\n array: [{ a: 1 }, { b: 2 }],\n },\n },\n ],\n description: \"sleeper Agent\",\n category: [\"sleeper\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sleeperAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\ntype CompareDataItem = string | number | boolean | CompareData;\ntype CompareData = CompareDataItem[];\n\nconst compare = (_array: CompareData): boolean => {\n if (_array.length !== 3) {\n throw new Error(`compare inputs length must must be 3`);\n }\n const array = _array.map((value) => {\n if (Array.isArray(value)) {\n return compare(value);\n }\n return value;\n });\n const [a, operator, b] = array;\n if (operator === \"==\") {\n return a === b;\n }\n if (operator === \"!=\") {\n return a !== b;\n }\n if (operator === \">\") {\n return Number(a) > Number(b);\n }\n if (operator === \">=\") {\n return Number(a) >= Number(b);\n }\n if (operator === \"<\") {\n return Number(a) < Number(b);\n }\n if (operator === \"<=\") {\n return Number(a) <= Number(b);\n }\n if (operator === \"||\") {\n return !!a || !!b;\n }\n if (operator === \"&&\") {\n return !!a && !!b;\n }\n if (operator === \"XOR\") {\n return !!a === !b;\n }\n throw new Error(`unknown compare operator`);\n};\n\nexport const compareAgent: AgentFunction = async ({ namedInputs, params }) => {\n const ret = compare(namedInputs.array);\n if (params?.value) {\n return params?.value[ret ? \"true\" : \"false\"] ?? ret;\n }\n return ret;\n};\n\nconst compareAgentInfo: AgentFunctionInfo = {\n name: \"compareAgent\",\n agent: compareAgent,\n mock: compareAgent,\n inputs: {},\n output: {},\n samples: [\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"a\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abca\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"b\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abcd\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abc\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abcd\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"15\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">\", 15] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \">=\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 10\n inputs: { array: [\"10\", \">=\", \"19\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">=\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 19] },\n params: {},\n result: false,\n },\n //\n\n {\n inputs: { array: [\"10\", \"<\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<\", \"15\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<\", 15] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 20\n inputs: { array: [\"10\", \"<=\", \"19\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 19] },\n params: {},\n result: true,\n },\n\n {\n inputs: { array: [true, \"||\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"||\", false] },\n params: {},\n result: false,\n },\n\n {\n inputs: { array: [true, \"&&\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"&&\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [true, \"XOR\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"XOR\", true] },\n params: {},\n result: false,\n },\n //\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"||\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [[[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"bbb\", \"==\", \"bbb\"]], \"||\", [\"aaa\", \"&&\", \"bbb\"]] },\n params: {},\n result: true,\n },\n ],\n description: \"compare\",\n category: [\"compare\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default compareAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\n// https://platform.openai.com/docs/guides/vision\nconst getImageUrl = (data: string, imageType: string, detail?: string) => {\n if (imageType === \"http\") {\n return {\n url: data,\n };\n }\n const dataUrl = `data:image/${imageType};base64,${data}`;\n return {\n url: dataUrl,\n detail: detail ?? \"auto\",\n };\n};\n\ntype Content = { type: string; image_url: { url: string; detail?: string } } | { type: string; text: string };\n\nexport const images2messageAgent: AgentFunction<\n {\n imageType: string;\n detail?: string;\n },\n {\n message: {\n role: \"user\";\n content: Content[];\n };\n },\n {\n array: string[];\n prompt?: string;\n }\n> = async ({ namedInputs, params }) => {\n const { imageType, detail } = params;\n const { array, prompt } = namedInputs;\n arrayValidate(\"images2messageAgent\", namedInputs);\n assert(!!imageType, \"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...\");\n\n const contents: Content[] = array.map((base64ImageData) => {\n const image_url = getImageUrl(base64ImageData, imageType, detail);\n return {\n type: \"image_url\",\n image_url,\n };\n });\n\n if (prompt) {\n contents.unshift({ type: \"text\", text: prompt });\n }\n\n return {\n message: {\n role: \"user\",\n content: contents,\n },\n };\n};\n\nconst images2messageAgentInfo: AgentFunctionInfo = {\n name: \"images2messageAgent\",\n agent: images2messageAgent,\n mock: images2messageAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of base64 image data\",\n },\n prompt: {\n type: \"string\",\n description: \"prompt message\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [\"abcabc\", \"122123\"] },\n params: { imageType: \"png\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"abcabc\", \"122123\"], prompt: \"hello\" },\n params: { imageType: \"jpg\", detail: \"high\" },\n result: {\n message: {\n content: [\n {\n type: \"text\",\n text: \"hello\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"http://example.com/1.jpg\", \"http://example.com/2.jpg\"] },\n params: { imageType: \"http\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n url: \"http://example.com/1.jpg\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n url: \"http://example.com/2.jpg\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n ],\n description: \"Returns the message data for llm include image\",\n category: [\"image\"],\n author: \"Receptron team\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default images2messageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\n// Type for OpenAI's Embedding API\ninterface EmbeddingResponse {\n object: string;\n model: string;\n usage: {\n prompt_tokens: number;\n total_tokens: number;\n };\n data: [\n {\n object: string;\n index: number;\n embedding: number[];\n },\n ];\n}\n\nconst defaultEmbeddingModel = \"text-embedding-3-small\";\nconst OpenAI_embedding_API = \"https://api.openai.com/v1/embeddings\";\n\n// This agent retrieves embedding vectors for an array of strings using OpenAI's API\n//\n// Parameters:\n// model: Specifies the model (default is \"text-embedding-3-small\")\n// NamedInputs:\n// array: Array\n// item: string,\n// Result:\n// contents: Array>\n//\nexport const stringEmbeddingsAgent: AgentFunction<\n {\n model?: string;\n },\n number[][],\n { array: Array; item: string }\n> = async ({ params, namedInputs }) => {\n const { array, item } = namedInputs;\n\n const sources = array ?? [item];\n const apiKey = process.env.OPENAI_API_KEY;\n if (!apiKey) {\n throw new Error(\"OPENAI_API_KEY key is not set in environment variables.\");\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${apiKey}`,\n };\n\n const response = await fetch(OpenAI_embedding_API, {\n method: \"POST\",\n headers: headers,\n body: JSON.stringify({\n input: sources,\n model: params?.model ?? defaultEmbeddingModel,\n }),\n });\n const jsonResponse: EmbeddingResponse = await response.json();\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const embeddings = jsonResponse.data.map((object) => {\n return object.embedding;\n });\n return embeddings;\n};\n\nconst stringEmbeddingsAgentInfo: AgentFunctionInfo = {\n name: \"stringEmbeddingsAgent\",\n agent: stringEmbeddingsAgent,\n mock: stringEmbeddingsAgent,\n samples: [],\n description: \"Embeddings Agent\",\n category: [\"embedding\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringEmbeddingsAgentInfo;\n"],"names":["stringSplitterAgent","async","params","namedInputs","assert","source","text","chunkSize","overlap","Math","floor","count","length","contents","Array","fill","undefined","map","_","i","startIndex","substring","stringSplitterAgentInfo","name","agent","mock","inputs","type","properties","description","required","output","samples","result","category","author","repository","license","processTemplate","template","match","input","replace","isArray","item","isObject","Object","keys","reduce","tmp","key","stringTemplateAgent","console","warn","sampleNamedInput","message1","message2","stringTemplateAgentInfo","apple","lemon","row","version","nodes","ai","isResult","prompt","jsonParserAgent","data","JSON","stringify","parse","sample_object","json_str","md_json1","join","md_json2","md_json3","jsonParserAgentInfo","anyOf","stringCaseVariantsAgent","suffix","normalizedArray","trim","toLowerCase","split","push","normalized","lowerCamelCase","word","index","charAt","toUpperCase","slice","snakeCase","kebabCase","stringCaseVariantsAgentInfo","nestedAgentGenerator","graphData","options","context","log","debugInfo","forNestedGraph","agents","graphOptions","onLogCallback","taskManager","throwError","status","getStatus","concurrency","running","nestedGraphData","graphDataLatestVersion","nodeIds","forEach","nodeId","value","graphAI","GraphAI","results","run","transactionLogs","resultNodeId","error","Error","onError","message","nestedAgent","nestedAgentInfo","test","graph","namedKey","messages","updateTextGraph","isNewText","if","isOldText","unless","updatedText","anyInput","resultText","updateTextAgent","updateTextAgentInfo","newText","oldText","tools","hasGraphData","pushAgent","extra_message","arrayValidate","items","array","pushAgentInfo","banana","cacheType","popAgent","pop","popAgentInfo","array2","shiftAgent","shift","shiftAgentInfo","arrayFlatAgent","depth","flat","arrayFlatAgentInfo","arrayJoinAgent","separator","arrayJoinAgentInfo","dotProductAgent","matrix","vector","vector0","dotProduct","dotProductAgentInfo","sortByValuesAgent","values","direction","assendant","sort","a","b","sortByValuesAgentInfo","echoAgent","filterParams","echoAgentInfo","countingAgent","list","countingAgentInfo","copyMessageAgent","copyMessageAgentInfo","copy2ArrayAgent","isNamedInputs","copy2ArrayAgentInfo","mergeNodeIdAgent","mergeNodeIdAgentInfo","streamMockAgent","token","streamTokenCallback","sleep","streamMockAgentInfo","stream","mapAgent","rows","limit","resultAll","mappedNodeId","graphs","injectValue","runs","Promise","all","logs","mapIndex","compositeResult","mapAgentInfo","node2","fruit","verb","__mapIndex","totalAgent","innerInput","totalAgentInfo","c","d","dataSumTemplateAgent","dataSumTemplateAgentInfo","applyFilter","object","arrayInputs","include","exclude","alter","inject","swap","inspect","propIds","excludeSet","Set","propId","has","mapping","from","equal","notEqual","propertyFilterAgent","target","testInputs","color","model","maker","range","propertyFilterAgentInfo","red","blue","isTesla","isGM","copyAgent","copyAgentInfo","vanillaFetchAgent","url","method","queryParams","headers","body","url0","URL","headers0","URLSearchParams","search","toString","fetchOptions","Headers","debug","response","fetch","ok","json","vanillaFetchAgentInfo","quaryParams","foo","sleeperAgent","duration","sleeperAgentInfo","compare","_array","operator","Number","compareAgent","ret","compareAgentInfo","true","false","images2messageAgent","imageType","detail","base64ImageData","image_url","getImageUrl","unshift","role","content","images2messageAgentInfo","stringEmbeddingsAgent","sources","apiKey","process","env","OPENAI_API_KEY","Authorization","jsonResponse","embedding","stringEmbeddingsAgentInfo"],"mappings":"wEAUA,MAEaA,EAcTC,OAASC,SAAQC,kBACnBC,WAASD,EAAa,kDACtB,MAAME,EAASF,EAAYG,KACrBC,EAAYL,EAAOK,WAnBF,KAoBjBC,EAAUN,EAAOM,SAAWC,KAAKC,MAAMH,EAAY,GACnDI,EAAQF,KAAKC,MAAML,EAAOO,QAAUL,EAAYC,IAAY,EAMlE,MAAO,CAAEK,SALQ,IAAIC,MAAMH,GAAOI,UAAKC,GAAWC,KAAI,CAACC,EAAGC,KACxD,MAAMC,EAAaD,GAAKZ,EAAYC,GACpC,OAAOH,EAAOgB,UAAUD,EAAYA,EAAab,EAAU,IAG1CI,QAAOJ,YAAWC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AGVkR,KAAM,UAIZ,CACEnR,OAAQ,CAAE8H,MAAO,CAAC,2BAA4B,6BAC9CtJ,OAAQ,CAAEqS,UAAW,QACrBtQ,OAAQ,CACN8F,QAAS,CACP+K,QAAS,CACP,CACEJ,UAAW,CACTrC,IAAK,4BAEP1O,KAAM,aAER,CACE+Q,UAAW,CACTrC,IAAK,4BAEP1O,KAAM,cAGVkR,KAAM,WAKdhR,YAAa,iDACbK,SAAU,CAAC,SACXC,OAAQ,iBACRC,WAAY,uCACZC,QAAS,OCpIE2Q,GAMT/S,OAASC,SAAQC,kBACnB,MAAMqJ,MAAEA,EAAK5G,KAAEA,GAASzC,EAElB8S,EAAUzJ,GAAS,CAAC5G,GACpBsQ,EAASC,QAAQC,IAAIC,eAC3B,IAAKH,EACH,MAAM,IAAIrL,MAAM,2DAElB,MAAM2I,EAAU,CACd,eAAgB,mBAChB8C,cAAe,UAAUJ,KAGrB/B,QAAiBC,MA/BI,uCA+BwB,CACjDd,OAAQ,OACRE,QAASA,EACTC,KAAMrM,KAAKC,UAAU,CACnB5B,MAAOwQ,EACPvD,MAAOxP,GAAQwP,OArCS,6BAwCtB6D,QAAwCpC,EAASG,OAEvD,IAAKH,EAASE,GACZ,MAAM,IAAIxJ,MAAM,uBAAuBsJ,EAASvK,UAKlD,OAHmB2M,EAAapP,KAAKlD,KAAKoN,GACjCA,EAAOmF,WAEC,EAGbC,GAA+C,CACnDlS,KAAM,wBACNC,MAAOwR,GACPvR,KAAMuR,GACNhR,QAAS,GACTH,YAAa,mBACbK,SAAU,CAAC,aACXC,OAAQ,iBACRC,WAAY,uCACZC,QAAS"} \ No newline at end of file diff --git a/agents/vanilla_agents/lib/bundle.esm.js b/agents/vanilla_agents/lib/bundle.esm.js index f2233de8..a6f926b4 100644 --- a/agents/vanilla_agents/lib/bundle.esm.js +++ b/agents/vanilla_agents/lib/bundle.esm.js @@ -1,4 +1,4 @@ -import { assert, isObject, sleep, graphDataLatestVersion, GraphAI } from 'graphai'; +import { assert, isObject, graphDataLatestVersion, GraphAI, sleep } from 'graphai'; // This agent strip one long string into chunks using following parameters // @@ -308,6 +308,160 @@ const stringCaseVariantsAgentInfo = { license: "MIT", }; +const nestedAgentGenerator = (graphData, options) => { + return async (context) => { + const { namedInputs, log, debugInfo, params, forNestedGraph } = context; + assert(!!forNestedGraph, "Please update graphai to 0.5.19 or higher"); + const { agents, graphOptions, onLogCallback } = forNestedGraph; + const { taskManager } = graphOptions; + const throwError = params.throwError ?? false; + if (taskManager) { + const status = taskManager.getStatus(false); + assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`); + } + assert(!!graphData, "nestedAgent: graph is required"); + const { nodes } = graphData; + const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy + const nodeIds = Object.keys(namedInputs); + if (nodeIds.length > 0) { + nodeIds.forEach((nodeId) => { + if (nestedGraphData.nodes[nodeId] === undefined) { + // If the input node does not exist, automatically create a static node + nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] }; + } + else { + // Otherwise, inject the proper data here (instead of calling injectTo method later) + nestedGraphData.nodes[nodeId]["value"] = namedInputs[nodeId]; + } + }); + } + try { + if (nestedGraphData.version === undefined && debugInfo.version) { + nestedGraphData.version = debugInfo.version; + } + const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions); + // for backward compatibility. Remove 'if' later + if (onLogCallback) { + graphAI.onLogCallback = onLogCallback; + } + const results = await graphAI.run(false); + log?.push(...graphAI.transactionLogs()); + if (options && options.resultNodeId) { + return results[options.resultNodeId]; + } + return results; + } + catch (error) { + if (error instanceof Error && !throwError) { + return { + onError: { + message: error.message, + error, + }, + }; + } + throw error; + } + }; +}; +const nestedAgent = async (context) => { + const { forNestedGraph } = context; + const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } }; + assert(!!graphData, "No GraphData"); + return await nestedAgentGenerator(graphData)(context); +}; +const nestedAgentInfo = { + name: "nestedAgent", + agent: nestedAgent, + mock: nestedAgent, + samples: [ + { + inputs: { + message: "hello", + }, + params: {}, + result: { + test: ["hello"], + }, + graph: { + nodes: { + test: { + agent: "copyAgent", + params: { namedKey: "messages" }, + inputs: { messages: [":message"] }, + isResult: true, + }, + }, + }, + }, + ], + description: "nested Agent", + category: ["graph"], + author: "Receptron team", + repository: "https://github.com/receptron/graphai", + license: "MIT", +}; + +const updateTextGraph = { + version: graphDataLatestVersion, + nodes: { + isNewText: { + if: ":newText", + agent: "copyAgent", + inputs: { + text: ":newText", + }, + }, + isOldText: { + unless: ":newText", + agent: "copyAgent", + inputs: { + text: ":oldText", + }, + }, + updatedText: { + agent: "copyAgent", + anyInput: true, + inputs: { + text: [":isNewText.text", ":isOldText.text"], + }, + }, + resultText: { + isResult: true, + agent: "copyAgent", + anyInput: true, + inputs: { + text: ":updatedText.text.$0", + }, + }, + }, +}; +const updateTextAgent = nestedAgentGenerator(updateTextGraph, { resultNodeId: "resultText" }); +const updateTextAgentInfo = { + name: "updateTextAgent", + agent: updateTextAgent, + mock: updateTextAgent, + samples: [ + { + inputs: { newText: "new", oldText: "old" }, + params: {}, + result: { text: "new" }, + }, + { + inputs: { newText: "", oldText: "old" }, + params: {}, + result: { text: "old" }, + }, + ], + description: "", + category: [], + author: "", + repository: "", + tools: [], + license: "", + hasGraphData: true, +}; + var lib = {}; var hasRequiredLib; @@ -1142,97 +1296,6 @@ const streamMockAgentInfo = { stream: true, }; -const nestedAgentGenerator = (graphData) => { - return async (context) => { - const { namedInputs, log, debugInfo, params, forNestedGraph } = context; - assert(!!forNestedGraph, "Please update graphai to 0.5.19 or higher"); - const { agents, graphOptions, onLogCallback } = forNestedGraph; - const { taskManager } = graphOptions; - const throwError = params.throwError ?? false; - if (taskManager) { - const status = taskManager.getStatus(false); - assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`); - } - assert(!!graphData, "nestedAgent: graph is required"); - const { nodes } = graphData; - const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy - const nodeIds = Object.keys(namedInputs); - if (nodeIds.length > 0) { - nodeIds.forEach((nodeId) => { - if (nestedGraphData.nodes[nodeId] === undefined) { - // If the input node does not exist, automatically create a static node - nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] }; - } - else { - // Otherwise, inject the proper data here (instead of calling injectTo method later) - nestedGraphData.nodes[nodeId]["value"] = namedInputs[nodeId]; - } - }); - } - try { - if (nestedGraphData.version === undefined && debugInfo.version) { - nestedGraphData.version = debugInfo.version; - } - const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions); - // for backward compatibility. Remove 'if' later - if (onLogCallback) { - graphAI.onLogCallback = onLogCallback; - } - const results = await graphAI.run(false); - log?.push(...graphAI.transactionLogs()); - return results; - } - catch (error) { - if (error instanceof Error && !throwError) { - return { - onError: { - message: error.message, - error, - }, - }; - } - throw error; - } - }; -}; -const nestedAgent = async (context) => { - const { forNestedGraph } = context; - const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } }; - assert(!!graphData, "No GraphData"); - return await nestedAgentGenerator(graphData)(context); -}; -const nestedAgentInfo = { - name: "nestedAgent", - agent: nestedAgent, - mock: nestedAgent, - samples: [ - { - inputs: { - message: "hello", - }, - params: {}, - result: { - test: ["hello"], - }, - graph: { - nodes: { - test: { - agent: "copyAgent", - params: { namedKey: "messages" }, - inputs: { messages: [":message"] }, - isResult: true, - }, - }, - }, - }, - ], - description: "nested Agent", - category: ["graph"], - author: "Receptron team", - repository: "https://github.com/receptron/graphai", - license: "MIT", -}; - const mapAgent = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => { assert(!!forNestedGraph, "Please update graphai to 0.5.19 or higher"); const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph; @@ -2653,5 +2716,5 @@ const stringEmbeddingsAgentInfo = { license: "MIT", }; -export { arrayFlatAgentInfo as arrayFlatAgent, arrayJoinAgentInfo as arrayJoinAgent, compareAgentInfo as compareAgent, copy2ArrayAgentInfo as copy2ArrayAgent, copyAgentInfo as copyAgent, copyMessageAgentInfo as copyMessageAgent, countingAgentInfo as countingAgent, dataSumTemplateAgentInfo as dataSumTemplateAgent, dotProductAgentInfo as dotProductAgent, echoAgentInfo as echoAgent, images2messageAgentInfo as images2messageAgent, jsonParserAgentInfo as jsonParserAgent, mapAgentInfo as mapAgent, mergeNodeIdAgentInfo as mergeNodeIdAgent, nestedAgentInfo as nestedAgent, popAgentInfo as popAgent, propertyFilterAgentInfo as propertyFilterAgent, pushAgentInfo as pushAgent, shiftAgentInfo as shiftAgent, sleeperAgentInfo as sleeperAgent, sortByValuesAgentInfo as sortByValuesAgent, streamMockAgentInfo as streamMockAgent, stringCaseVariantsAgentInfo as stringCaseVariantsAgent, stringEmbeddingsAgentInfo as stringEmbeddingsAgent, stringSplitterAgentInfo as stringSplitterAgent, stringTemplateAgentInfo as stringTemplateAgent, totalAgentInfo as totalAgent, vanillaFetchAgentInfo as vanillaFetchAgent }; +export { arrayFlatAgentInfo as arrayFlatAgent, arrayJoinAgentInfo as arrayJoinAgent, compareAgentInfo as compareAgent, copy2ArrayAgentInfo as copy2ArrayAgent, copyAgentInfo as copyAgent, copyMessageAgentInfo as copyMessageAgent, countingAgentInfo as countingAgent, dataSumTemplateAgentInfo as dataSumTemplateAgent, dotProductAgentInfo as dotProductAgent, echoAgentInfo as echoAgent, images2messageAgentInfo as images2messageAgent, jsonParserAgentInfo as jsonParserAgent, mapAgentInfo as mapAgent, mergeNodeIdAgentInfo as mergeNodeIdAgent, nestedAgentInfo as nestedAgent, popAgentInfo as popAgent, propertyFilterAgentInfo as propertyFilterAgent, pushAgentInfo as pushAgent, shiftAgentInfo as shiftAgent, sleeperAgentInfo as sleeperAgent, sortByValuesAgentInfo as sortByValuesAgent, streamMockAgentInfo as streamMockAgent, stringCaseVariantsAgentInfo as stringCaseVariantsAgent, stringEmbeddingsAgentInfo as stringEmbeddingsAgent, stringSplitterAgentInfo as stringSplitterAgent, stringTemplateAgentInfo as stringTemplateAgent, totalAgentInfo as totalAgent, updateTextAgentInfo as updateTextAgent, vanillaFetchAgentInfo as vanillaFetchAgent }; //# sourceMappingURL=bundle.esm.js.map diff --git a/agents/vanilla_agents/lib/bundle.esm.js.map b/agents/vanilla_agents/lib/bundle.esm.js.map index bd5d4bc1..6bc1ccd9 100644 --- a/agents/vanilla_agents/lib/bundle.esm.js.map +++ b/agents/vanilla_agents/lib/bundle.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.esm.js","sources":["../src/string_agents/string_splitter_agent.ts","../src/string_agents/string_template_agent.ts","../src/string_agents/json_parser_agent.ts","../src/string_agents/string_case_variants_agent.ts","../../agent_utils/lib/index.js","../src/array_agents/push_agent.ts","../src/array_agents/pop_agent.ts","../src/array_agents/shift_agent.ts","../src/array_agents/array_flat_agent.ts","../src/array_agents/array_join_agent.ts","../src/matrix_agents/dot_product_agent.ts","../src/matrix_agents/sort_by_values_agent.ts","../src/test_agents/echo_agent.ts","../src/test_agents/counting_agent.ts","../src/test_agents/copy_message_agent.ts","../src/test_agents/copy2array_agent.ts","../src/test_agents/merge_node_id_agent.ts","../src/test_agents/stream_mock_agent.ts","../src/graph_agents/nested_agent.ts","../src/graph_agents/map_agent.ts","../src/data_agents/total_agent.ts","../src/data_agents/data_sum_template_agent.ts","../src/data_agents/property_filter_agent.ts","../src/data_agents/copy_agent.ts","../src/service_agents/vanilla_fetch_agent.ts","../src/sleeper_agents/sleeper_agent.ts","../src/compare_agents/compare_agent.ts","../src/images_agents/image_to_message_agent.ts","../src/embedding_agent.ts"],"sourcesContent":["import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent strip one long string into chunks using following parameters\n//\n// chunkSize: number; // default is 2048\n// overlap: number; // default is 1/8th of chunkSize.\n//\n// see example\n// tests/agents/test_string_agent.ts\n//\nconst defaultChunkSize = 2048;\n\nexport const stringSplitterAgent: AgentFunction<\n {\n chunkSize?: number;\n overlap?: number;\n },\n {\n contents: Array;\n count: number;\n chunkSize: number;\n overlap: number;\n },\n {\n text: string;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"stringSplitterAgent: namedInputs is UNDEFINED!\");\n const source = namedInputs.text;\n const chunkSize = params.chunkSize ?? defaultChunkSize;\n const overlap = params.overlap ?? Math.floor(chunkSize / 8);\n const count = Math.floor(source.length / (chunkSize - overlap)) + 1;\n const contents = new Array(count).fill(undefined).map((_, i) => {\n const startIndex = i * (chunkSize - overlap);\n return source.substring(startIndex, startIndex + chunkSize);\n });\n\n return { contents, count, chunkSize, overlap };\n};\n\n// for test and document\nconst sampleInput = {\n text: \"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do.\",\n};\n\nconst sampleParams = { chunkSize: 64 };\nconst sampleResult = {\n contents: [\n \"Here's to the crazy ones, the misfits, the rebels, the troublema\",\n \"roublemakers, the round pegs in the square holes ... the ones wh\",\n \" ones who see things differently -- they're not fond of rules, a\",\n \"rules, and they have no respect for the status quo. ... You can \",\n \"You can quote them, disagree with them, glorify or vilify them, \",\n \"y them, but the only thing you can't do is ignore them because t\",\n \"ecause they change things. ... They push the human race forward,\",\n \"forward, and while some may see them as the crazy ones, we see g\",\n \"we see genius, because the people who are crazy enough to think \",\n \"o think that they can change the world, are the ones who do.\",\n \" do.\",\n ],\n count: 11,\n chunkSize: 64,\n overlap: 8,\n};\n\nconst stringSplitterAgentInfo: AgentFunctionInfo = {\n name: \"stringSplitterAgent\",\n agent: stringSplitterAgent,\n mock: stringSplitterAgent,\n inputs: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"text to be chuncked\",\n },\n },\n required: [\"text\"],\n },\n output: {\n type: \"object\",\n properties: {\n contents: {\n type: \"array\",\n description: \"the array of text chunks\",\n },\n count: {\n type: \"number\",\n description: \"the number of chunks\",\n },\n chunkSize: {\n type: \"number\",\n description: \"the chunk size\",\n },\n overlap: {\n type: \"number\",\n description: \"the overlap size\",\n },\n },\n },\n samples: [\n {\n inputs: sampleInput,\n params: sampleParams,\n result: sampleResult,\n },\n ],\n description: \"This agent strip one long string into chunks using following parameters\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringSplitterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, isObject } from \"graphai\";\n\ntype StringTemplate = string | Record;\ntype StringTemplateObject = StringTemplate | StringTemplate[] | Record;\n\nconst processTemplate: any = (template: StringTemplateObject, match: string, input: string) => {\n if (typeof template === \"string\") {\n if (template === match) {\n return input;\n }\n return template.replace(match, input);\n } else if (Array.isArray(template)) {\n return template.map((item: StringTemplate) => processTemplate(item, match, input));\n }\n\n if (isObject(template)) {\n return Object.keys(template).reduce((tmp: any, key: string) => {\n tmp[key] = processTemplate(template[key], match, input);\n return tmp;\n }, {});\n }\n return template;\n};\n\nexport const stringTemplateAgent: AgentFunction<\n {\n template: StringTemplateObject;\n },\n StringTemplateObject,\n Record\n> = async ({ params, namedInputs }) => {\n if (params.template === undefined) {\n if (namedInputs.text) {\n return namedInputs.text;\n }\n console.warn(\"warning: stringTemplateAgent no template\");\n }\n return Object.keys(namedInputs).reduce((template, key) => {\n return processTemplate(template, \"${\" + key + \"}\", namedInputs[key]);\n }, params.template);\n};\n\nconst sampleNamedInput = { message1: \"hello\", message2: \"test\" };\n\n// for test and document\nconst stringTemplateAgentInfo: AgentFunctionInfo = {\n name: \"stringTemplateAgent\",\n agent: stringTemplateAgent,\n mock: stringTemplateAgent,\n samples: [\n // named\n {\n inputs: sampleNamedInput,\n params: { template: \"${message1}: ${message2}\" },\n result: \"hello: test\",\n },\n {\n inputs: sampleNamedInput,\n params: { template: [\"${message1}: ${message2}\", \"${message2}: ${message1}\"] },\n result: [\"hello: test\", \"test: hello\"],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: \"${message2}\" } },\n result: { apple: \"hello\", lemon: \"test\" },\n },\n {\n inputs: sampleNamedInput,\n params: { template: [{ apple: \"${message1}\", lemon: \"${message2}\" }] },\n result: [{ apple: \"hello\", lemon: \"test\" }],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: [\"${message2}\"] } },\n result: { apple: \"hello\", lemon: [\"test\"] },\n },\n // graphData\n {\n inputs: { agent: \"openAiAgent\", row: \"hello world\", params: { text: \"message\" } },\n params: {\n template: {\n version: 0.5,\n nodes: {\n ai: {\n agent: \"${agent}\",\n isResult: true,\n params: \"${params}\",\n inputs: { prompt: \"${row}\" },\n },\n },\n },\n },\n result: {\n nodes: {\n ai: {\n agent: \"openAiAgent\",\n inputs: {\n prompt: \"hello world\",\n },\n isResult: true,\n params: { text: \"message\" },\n },\n },\n version: 0.5,\n },\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const jsonParserAgent: AgentFunction<\n null,\n unknown,\n {\n text: string;\n data: unknown;\n }\n> = async ({ namedInputs }) => {\n const { text, data } = namedInputs;\n\n if (data) {\n return JSON.stringify(data, null, 2);\n }\n const match = (\"\\n\" + text).match(/\\n```[a-zA-z]*([\\s\\S]*?)\\n```/);\n if (match) {\n return JSON.parse(match[1]);\n }\n return JSON.parse(text);\n};\n\nconst sample_object = { apple: \"red\", lemon: \"yellow\" };\n\nconst json_str = JSON.stringify(sample_object);\nconst md_json1 = [\"```\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json2 = [\"```json\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json3 = [\"```JSON\", json_str, \"```\"].join(\"\\n\");\n\nconst jsonParserAgentInfo: AgentFunctionInfo = {\n name: \"jsonParserAgent\",\n agent: jsonParserAgent,\n mock: jsonParserAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n type: \"string\",\n },\n samples: [\n {\n inputs: { data: sample_object },\n params: {},\n result: JSON.stringify(sample_object, null, 2),\n },\n {\n inputs: { text: JSON.stringify(sample_object, null, 2) },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json1 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json2 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json3 },\n params: {},\n result: sample_object,\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default jsonParserAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const stringCaseVariantsAgent: AgentFunction<\n { suffix?: string },\n { lowerCamelCase: string; snakeCase: string; kebabCase: string; normalized: string },\n { text: string }\n> = async ({ namedInputs, params }) => {\n const { suffix } = params;\n const normalizedArray = namedInputs.text\n .trim()\n .replace(/[\\s-_]+/g, \" \")\n .toLowerCase()\n .split(\" \");\n if (suffix && normalizedArray[normalizedArray.length - 1] !== suffix) {\n normalizedArray.push(suffix);\n }\n const normalized = normalizedArray.join(\" \");\n\n const lowerCamelCase = normalizedArray\n .map((word, index) => {\n if (index === 0) return word;\n return word.charAt(0).toUpperCase() + word.slice(1);\n })\n .join(\"\");\n\n const snakeCase = normalized.replace(/\\s+/g, \"_\");\n const kebabCase = normalized.replace(/\\s+/g, \"-\");\n\n return { lowerCamelCase, snakeCase, kebabCase, normalized };\n};\n\nconst stringCaseVariantsAgentInfo: AgentFunctionInfo = {\n name: \"stringCaseVariantsAgent\",\n agent: stringCaseVariantsAgent,\n mock: stringCaseVariantsAgent,\n samples: [\n {\n inputs: { text: \"this is a pen\" },\n params: {},\n result: {\n kebabCase: \"this-is-a-pen\",\n lowerCamelCase: \"thisIsAPen\",\n normalized: \"this is a pen\",\n snakeCase: \"this_is_a_pen\",\n },\n },\n {\n inputs: { text: \"string case variants\" },\n params: { suffix: \"agent\" },\n result: {\n kebabCase: \"string-case-variants-agent\",\n lowerCamelCase: \"stringCaseVariantsAgent\",\n normalized: \"string case variants agent\",\n snakeCase: \"string_case_variants_agent\",\n },\n },\n ],\n description: \"Format String Cases agent\",\n category: [\"string\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringCaseVariantsAgentInfo;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.arrayValidate = exports.isNamedInputs = exports.sample2GraphData = void 0;\nconst graphai_1 = require(\"graphai\");\nconst sample2GraphData = (sample, agentName) => {\n const nodes = {};\n const inputs = (() => {\n if (Array.isArray(sample.inputs)) {\n Array.from(sample.inputs.keys()).forEach((key) => {\n nodes[\"sampleInput\" + key] = {\n value: sample.inputs[key],\n };\n });\n return Object.keys(nodes).map((k) => \":\" + k);\n }\n nodes[\"sampleInput\"] = {\n value: sample.inputs,\n };\n return Object.keys(sample.inputs).reduce((tmp, key) => {\n tmp[key] = `:sampleInput.` + key;\n return tmp;\n }, {});\n })();\n nodes[\"node\"] = {\n isResult: true,\n agent: agentName,\n params: sample.params,\n inputs: inputs,\n graph: sample.graph,\n };\n const graphData = {\n version: 0.5,\n nodes,\n };\n return graphData;\n};\nexports.sample2GraphData = sample2GraphData;\nconst isNamedInputs = (namedInputs) => {\n return Object.keys(namedInputs || {}).length > 0;\n};\nexports.isNamedInputs = isNamedInputs;\nconst arrayValidate = (agentName, namedInputs, extra_message = \"\") => {\n (0, graphai_1.assert)((0, exports.isNamedInputs)(namedInputs), `${agentName}: namedInputs is UNDEFINED!` + extra_message);\n (0, graphai_1.assert)(!!namedInputs.array, `${agentName}: namedInputs.array is UNDEFINED!` + extra_message);\n (0, graphai_1.assert)(Array.isArray(namedInputs.array), `${agentName}: namedInputs.array is not Array.` + extra_message);\n};\nexports.arrayValidate = arrayValidate;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const pushAgent: AgentFunction }, { array: Array; item?: unknown; items: Array }> = async ({\n namedInputs,\n}) => {\n const extra_message = \" Set inputs: { array: :arrayNodeId, item: :itemNodeId }\";\n arrayValidate(\"pushAgent\", namedInputs, extra_message);\n const { item, items } = namedInputs;\n assert(!!(item || items), \"pushAgent: namedInputs.item is UNDEFINED!\" + extra_message);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n if (item) {\n array.push(item);\n } else {\n items.forEach((item) => {\n array.push(item);\n });\n }\n return {\n array,\n };\n};\n\nconst pushAgentInfo: AgentFunctionInfo = {\n name: \"pushAgent\",\n agent: pushAgent,\n mock: pushAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to push an item to\",\n },\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n items: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2], item: 3 },\n params: {},\n result: { array: [1, 2, 3] },\n },\n {\n inputs: { array: [{ apple: 1 }], item: { lemon: 2 } },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }] },\n },\n {\n inputs: { array: [{ apple: 1 }], items: [{ lemon: 2 }, { banana: 3 }] },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }, { banana: 3 }] },\n },\n ],\n description: \"push Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default pushAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const popAgent: AgentFunction; item: unknown }, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"popAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.pop();\n return { array, item };\n};\n\nconst popAgentInfo: AgentFunctionInfo = {\n name: \"popAgent\",\n agent: popAgent,\n mock: popAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to pop an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item popped from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"a\", \"b\"],\n item: \"c\",\n },\n },\n {\n inputs: {\n array: [1, 2, 3],\n array2: [\"a\", \"b\", \"c\"],\n },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n ],\n description: \"Pop Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default popAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const shiftAgent: AgentFunction, Record, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"shiftAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.shift();\n return { array, item };\n};\n\nconst shiftAgentInfo: AgentFunctionInfo = {\n name: \"shiftAgent\",\n agent: shiftAgent,\n mock: shiftAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to shift an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item shifted from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [2, 3],\n item: 1,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"b\", \"c\"],\n item: \"a\",\n },\n },\n ],\n description: \"shift Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default shiftAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayFlatAgent: AgentFunction<{ depth?: number }, { array: Array }, { array: Array }> = async ({ namedInputs, params }) => {\n arrayValidate(\"arrayFlatAgent\", namedInputs);\n const depth = params.depth ?? 1;\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n return { array: array.flat(depth) };\n};\n\nconst arrayFlatAgentInfo: AgentFunctionInfo = {\n name: \"arrayFlatAgent\",\n agent: arrayFlatAgent,\n mock: arrayFlatAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"flat array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n params: {\n type: \"object\",\n properties: {\n depth: {\n type: \"number\",\n description: \"array depth\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n array: [1, 2, [3]],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: { depth: 2 },\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n array: [\"a\", \"b\", \"c\"],\n },\n },\n ],\n description: \"Array Flat Agent\",\n category: [\"array\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n cacheType: \"pureAgent\",\n license: \"MIT\",\n};\nexport default arrayFlatAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayJoinAgent: AgentFunction<{ separator?: string; flat?: number }, { text: string }, { array: Array }> = async ({\n namedInputs,\n params,\n}) => {\n arrayValidate(\"arrayJoinAgent\", namedInputs);\n const separator = params.separator ?? \"\";\n const { flat } = params;\n\n const text = flat ? namedInputs.array.flat(flat).join(separator) : namedInputs.array.join(separator);\n return { text };\n};\n\nconst arrayJoinAgentInfo: AgentFunctionInfo = {\n name: \"arrayJoinAgent\",\n agent: arrayJoinAgent,\n mock: arrayJoinAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"array join\",\n },\n },\n required: [\"array\"],\n },\n params: {\n type: \"object\",\n properties: {\n separator: {\n type: \"string\",\n description: \"array join separator\",\n },\n flat: {\n type: \"number\",\n description: \"array flat depth\",\n },\n },\n },\n output: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"joined text\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n text: \"abc\",\n },\n },\n //\n {\n inputs: { array: [[1], [2], [3]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 2 },\n result: {\n text: \"1|2|3\",\n },\n },\n ],\n description: \"Array Join Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default arrayJoinAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent calculates the dot product of an array of vectors (A[]) and a vector (B),\n// typically used to calculate cosine similarity of embedding vectors.\n// Inputs:\n// matrix: Two dimentional array of numbers.\n// vector: One dimentional array of numbers.\n// Outputs:\n// { contents: Array } // array of docProduct of each vector (A[]) and vector B\nexport const dotProductAgent: AgentFunction, Array, { matrix: Array>; vector: Array }> = async ({\n namedInputs,\n}) => {\n assert(!!namedInputs, \"dotProductAgent: namedInputs is UNDEFINED!\");\n const matrix = namedInputs.matrix as Array>;\n const vector = namedInputs.vector as Array;\n if (matrix[0].length != vector.length) {\n throw new Error(`dotProduct: Length of vectors do not match. ${matrix[0].length}, ${vector.length}`);\n }\n const contents = matrix.map((vector0) => {\n return vector0.reduce((dotProduct: number, value, index) => {\n return dotProduct + value * vector[index];\n }, 0);\n });\n return contents;\n};\n\nconst dotProductAgentInfo: AgentFunctionInfo = {\n name: \"dotProductAgent\",\n agent: dotProductAgent,\n mock: dotProductAgent,\n inputs: {\n type: \"object\",\n properties: {\n matrix: {\n type: \"array\",\n description: \"two dimentional matrix\",\n items: {\n type: \"array\",\n items: {\n type: \"number\",\n },\n },\n },\n vector: {\n type: \"array\",\n description: \"the vector\",\n items: {\n type: \"number\",\n },\n },\n },\n required: [\"matrix\", \"vector\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n matrix: [\n [1, 2],\n [3, 4],\n [5, 6],\n ],\n vector: [3, 2],\n },\n params: {},\n result: [7, 17, 27],\n },\n {\n inputs: {\n matrix: [\n [1, 2],\n [2, 3],\n ],\n vector: [1, 2],\n },\n params: {},\n result: [5, 8],\n },\n ],\n description: \"dotProduct Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dotProductAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent returned a sorted array of one array (A) based on another array (B).\n// The default sorting order is \"decendant\".\n//\n// Parameters:\n// acendant: Specifies if the sorting order should be acendant. The default is \"false\" (decendant).\n// Inputs:\n// array: Array; // array to be sorted\n// values: Array; // array of numbers for sorting\n//\nexport const sortByValuesAgent: AgentFunction<\n {\n assendant?: boolean;\n },\n Array,\n {\n array: Array;\n values: Array;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"sortByValue: namedInputs is UNDEFINED!\");\n assert(!!namedInputs.array, \"sortByValue: namedInputs.array is UNDEFINED!\");\n assert(!!namedInputs.values, \"sortByValue: namedInputs.values is UNDEFINED!\");\n\n const direction = (params?.assendant ?? false) ? -1 : 1;\n const array: Array = namedInputs.array;\n const values: Array = namedInputs.values;\n const joined = array.map((item, index) => {\n return { item, value: values[index] };\n });\n const contents = joined\n .sort((a, b) => {\n return (b.value - a.value) * direction;\n })\n .map((a) => {\n return a.item;\n });\n return contents;\n};\n\nconst sortByValuesAgentInfo: AgentFunctionInfo = {\n name: \"sortByValuesAgent\",\n agent: sortByValuesAgent,\n mock: sortByValuesAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to sort\",\n },\n values: {\n type: \"array\",\n description: \"values associated with items in the array\",\n },\n },\n required: [\"array\", \"values\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {},\n result: [\"lemon\", \"orange\", \"apple\", \"banana\"],\n },\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {\n assendant: true,\n },\n result: [\"banana\", \"apple\", \"orange\", \"lemon\"],\n },\n ],\n description: \"sortByValues Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sortByValuesAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const echoAgent: AgentFunction = async ({ params, filterParams }) => {\n if (params.filterParams) {\n return filterParams;\n }\n return params;\n};\n\n// for test and document\nconst echoAgentInfo: AgentFunctionInfo = {\n name: \"echoAgent\",\n agent: echoAgent,\n mock: echoAgent,\n samples: [\n {\n inputs: {},\n params: { text: \"this is test\" },\n result: { text: \"this is test\" },\n },\n {\n inputs: {},\n params: {\n text: \"If you add filterParams option, it will respond to filterParams\",\n filterParams: true,\n },\n result: {},\n },\n ],\n description: \"Echo agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default echoAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const countingAgent: AgentFunction<{ count: number }, { list: number[] }> = async ({ params }) => {\n return {\n list: new Array(params.count).fill(undefined).map((_, i) => {\n return i;\n }),\n };\n};\n\n// for test and document\nconst countingAgentInfo: AgentFunctionInfo = {\n name: \"countingAgent\",\n agent: countingAgent,\n mock: countingAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4 },\n result: { list: [0, 1, 2, 3] },\n },\n ],\n description: \"Counting agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default countingAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const copyMessageAgent: AgentFunction<{ count: number; message: string }, { messages: string[] }> = async ({ params }) => {\n return {\n messages: new Array(params.count).fill(undefined).map(() => {\n return params.message;\n }),\n };\n};\n\n// for test and document\nconst copyMessageAgentInfo: AgentFunctionInfo = {\n name: \"copyMessageAgent\",\n agent: copyMessageAgent,\n mock: copyMessageAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4, message: \"hello\" },\n result: { messages: [\"hello\", \"hello\", \"hello\", \"hello\"] },\n },\n ],\n description: \"CopyMessage agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copyMessageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copy2ArrayAgent: AgentFunction<{ count: number }> = async ({ namedInputs, params }) => {\n assert(isNamedInputs(namedInputs), \"copy2ArrayAgent: namedInputs is UNDEFINED!\");\n const input = namedInputs.item ? namedInputs.item : namedInputs;\n return new Array(params.count).fill(undefined).map(() => {\n return input;\n });\n};\n\n// for test and document\nconst copy2ArrayAgentInfo: AgentFunctionInfo = {\n name: \"copy2ArrayAgent\",\n agent: copy2ArrayAgent,\n mock: copy2ArrayAgent,\n samples: [\n {\n inputs: { item: { message: \"hello\" } },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { message: \"hello\" },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { item: \"hello\" },\n params: { count: 10 },\n result: [\"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\"],\n },\n ],\n description: \"Copy2Array agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copy2ArrayAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const mergeNodeIdAgent: AgentFunction, { array: Record[] }> = async ({\n debugInfo: { nodeId },\n namedInputs,\n}) => {\n arrayValidate(\"mergeNodeIdAgent\", namedInputs);\n\n const dataSet = namedInputs.array;\n\n return dataSet.reduce(\n (tmp, input) => {\n return { ...tmp, ...input };\n },\n { [nodeId]: \"hello\" },\n );\n};\n\n// for test and document\nconst mergeNodeIdAgentInfo: AgentFunctionInfo = {\n name: \"mergeNodeIdAgent\",\n agent: mergeNodeIdAgent,\n mock: mergeNodeIdAgent,\n samples: [\n {\n inputs: { array: [{ message: \"hello\" }] },\n params: {},\n result: {\n message: \"hello\",\n test: \"hello\",\n },\n },\n ],\n description: \"merge node id agent\",\n category: [\"test\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default mergeNodeIdAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const streamMockAgent: AgentFunction = async ({ params, filterParams, namedInputs }) => {\n const message = params.message ?? namedInputs.message ?? \"\";\n\n for await (const token of message.split(\"\")) {\n if (filterParams.streamTokenCallback) {\n filterParams.streamTokenCallback(token);\n }\n await sleep(params.sleep || 100);\n }\n\n return { message };\n};\n\n// for test and document\nconst streamMockAgentInfo: AgentFunctionInfo = {\n name: \"streamMockAgent\",\n agent: streamMockAgent,\n mock: streamMockAgent,\n inputs: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n message: {\n type: \"string\",\n description: \"streaming message\",\n },\n },\n },\n {\n type: \"array\",\n },\n ],\n },\n samples: [\n {\n inputs: {},\n params: { message: \"this is params test\" },\n result: { message: \"this is params test\" },\n },\n {\n inputs: { message: \"this is named inputs test\" },\n params: {},\n result: { message: \"this is named inputs test\" },\n },\n ],\n description: \"Stream mock agent\",\n category: [\"test\"],\n author: \"Isamu Arimoto\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n stream: true,\n};\n\nexport default streamMockAgentInfo;\n","import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, StaticNodeData, GraphData } from \"graphai\";\nimport { GraphAI, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const nestedAgentGenerator: (graphData: GraphData) => (context: AgentFunctionContext) => Promise = (graphData: GraphData) => {\n return async (context: AgentFunctionContext) => {\n const { namedInputs, log, debugInfo, params, forNestedGraph } = context;\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n const throwError = params.throwError ?? false;\n if (taskManager) {\n const status = taskManager.getStatus(false);\n assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`);\n }\n assert(!!graphData, \"nestedAgent: graph is required\");\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n if (nodeIds.length > 0) {\n nodeIds.forEach((nodeId) => {\n if (nestedGraphData.nodes[nodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] };\n } else {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n (nestedGraphData.nodes[nodeId] as StaticNodeData)[\"value\"] = namedInputs[nodeId];\n }\n });\n }\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n\n const results = await graphAI.run(false);\n log?.push(...graphAI.transactionLogs());\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n };\n};\n\nexport const nestedAgent: AgentFunction<{ throwError?: boolean }> = async (context) => {\n const { forNestedGraph } = context;\n const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } };\n assert(!!graphData, \"No GraphData\");\n\n return await nestedAgentGenerator(graphData)(context);\n};\n\nconst nestedAgentInfo: AgentFunctionInfo = {\n name: \"nestedAgent\",\n agent: nestedAgent,\n mock: nestedAgent,\n samples: [\n {\n inputs: {\n message: \"hello\",\n },\n params: {},\n result: {\n test: [\"hello\"],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"messages\" },\n inputs: { messages: [\":message\"] },\n isResult: true,\n },\n },\n },\n },\n ],\n description: \"nested Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default nestedAgentInfo;\n","import { GraphAI, AgentFunction, AgentFunctionInfo, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const mapAgent: AgentFunction<\n {\n limit?: number;\n resultAll?: boolean;\n compositeResult?: boolean;\n throwError?: boolean;\n },\n Record\n> = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => {\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n\n if (taskManager) {\n const status = taskManager.getStatus();\n assert(status.concurrency > status.running, `mapAgent: Concurrency is too low: ${status.concurrency}`);\n }\n\n assert(!!namedInputs.rows, \"mapAgent: rows property is required in namedInput\");\n assert(!!graphData, \"mapAgent: graph is required\");\n\n const rows = namedInputs.rows.map((item: any) => item);\n if (params.limit && params.limit < rows.length) {\n rows.length = params.limit; // trim\n }\n const resultAll = params.resultAll ?? false;\n const throwError = params.throwError ?? false;\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n nestedGraphData.nodes[\"__mapIndex\"] = {};\n nodeIds.forEach((nodeId) => {\n const mappedNodeId = nodeId === \"rows\" ? \"row\" : nodeId;\n if (nestedGraphData.nodes[mappedNodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[mappedNodeId] = { value: namedInputs[nodeId] };\n } else if (!(\"agent\" in nestedGraphData.nodes[mappedNodeId])) {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n nestedGraphData.nodes[mappedNodeId][\"value\"] = namedInputs[nodeId];\n }\n });\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphs: Array = rows.map((row: any, index: number) => {\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n graphAI.injectValue(\"row\", row, \"__mapAgent_inputs__\");\n graphAI.injectValue(\"__mapIndex\", index, \"__mapAgent_inputs__\");\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n return graphAI;\n });\n\n const runs = graphs.map((graph) => {\n return graph.run(resultAll);\n });\n const results = await Promise.all(runs);\n const nodeIds = Object.keys(results[0]);\n // assert(nodeIds.length > 0, \"mapAgent: no return values (missing isResult)\");\n\n if (log) {\n const logs = graphs.map((graph, index) => {\n return graph.transactionLogs().map((log) => {\n log.mapIndex = index;\n return log;\n });\n });\n log.push(...logs.flat());\n }\n\n if (params.compositeResult) {\n const compositeResult = nodeIds.reduce((tmp: Record>, nodeId) => {\n tmp[nodeId] = results.map((result) => {\n return result[nodeId];\n });\n return tmp;\n }, {});\n return compositeResult;\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n};\n\nconst mapAgentInfo: AgentFunctionInfo = {\n name: \"mapAgent\",\n agent: mapAgent,\n mock: mapAgent,\n samples: [\n {\n inputs: {\n rows: [1, 2],\n },\n params: {},\n result: [{ test: [1] }, { test: [2] }],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${word}.\",\n },\n inputs: { word: \":row\" },\n isResult: true,\n },\n },\n },\n result: [\n { node2: \"I love apple.\" },\n { node2: \"I love orange.\" },\n { node2: \"I love banana.\" },\n { node2: \"I love lemon.\" },\n { node2: \"I love melon.\" },\n { node2: \"I love pineapple.\" },\n { node2: \"I love tomato.\" },\n ],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${item}.\",\n },\n inputs: { item: \":row.fruit\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"I love apple.\" }, { node2: \"I love orange.\" }],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n name: \"You\",\n verb: \"like\",\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"${name} ${verb} ${fruit}.\",\n },\n inputs: { fruit: \":row.fruit\", name: \":name\", verb: \":verb\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"You like apple.\" }, { node2: \"You like orange.\" }],\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n test: [1],\n row: 1,\n },\n {\n __mapIndex: 1,\n test: [2],\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n map: [\n {\n test: 1,\n },\n {\n test: 1,\n },\n ],\n row: 1,\n test: 1,\n },\n {\n __mapIndex: 1,\n map: [\n {\n test: 2,\n },\n {\n test: 2,\n },\n ],\n test: 2,\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n },\n },\n },\n },\n },\n },\n\n // old response\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${row}.\",\n },\n inputs: { row: \":row\" },\n isResult: true,\n },\n },\n },\n result: {\n node2: [\"I love apple.\", \"I love orange.\", \"I love banana.\", \"I love lemon.\", \"I love melon.\", \"I love pineapple.\", \"I love tomato.\"],\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n __mapIndex: [0, 1],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n __mapIndex: [0, 1],\n test: [[1], [2]],\n map: [\n {\n test: [[[1]], [[1]]],\n },\n {\n test: [[[2]], [[2]]],\n },\n ],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n },\n },\n },\n ],\n description: \"Map Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default mapAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const totalAgent: AgentFunction, Record, { array: Record[] }> = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((result, input) => {\n const inputArray = Array.isArray(input) ? input : [input];\n inputArray.forEach((innerInput) => {\n Object.keys(innerInput).forEach((key) => {\n const value = innerInput[key];\n if (result[key]) {\n result[key] += value;\n } else {\n result[key] = value;\n }\n });\n });\n return result;\n }, {});\n};\n\n//\nconst totalAgentInfo: AgentFunctionInfo = {\n name: \"totalAgent\",\n agent: totalAgent,\n mock: totalAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: { array: [[{ a: 1, b: -1 }, { c: 10 }], [{ a: 2, b: -1 }], [{ a: 3, b: -2 }, { d: -10 }]] },\n params: {},\n result: { a: 6, b: -4, c: 10, d: -10 },\n },\n {\n inputs: { array: [{ a: 1 }] },\n params: {},\n result: { a: 1 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }] },\n params: {},\n result: { a: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: {\n array: [\n { a: 1, b: 1 },\n { a: 2, b: 2 },\n { a: 3, b: 0 },\n ],\n },\n params: {},\n result: { a: 6, b: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2, b: 2 }, { a: 3, b: 0 }] },\n params: {},\n result: { a: 6, b: 2 },\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default totalAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const dataSumTemplateAgent: AgentFunction = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((tmp, input) => {\n return tmp + input;\n }, 0);\n};\n\nconst dataSumTemplateAgentInfo: AgentFunctionInfo = {\n name: \"dataSumTemplateAgent\",\n agent: dataSumTemplateAgent,\n mock: dataSumTemplateAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of numbers to calculate the sum of\",\n items: {\n type: \"integer\",\n },\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"number\",\n },\n samples: [\n {\n inputs: { array: [1] },\n params: {},\n result: 1,\n },\n {\n inputs: { array: [1, 2] },\n params: {},\n result: 3,\n },\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: 6,\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dataSumTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nconst applyFilter = (\n object: any,\n index: number,\n arrayInputs: any,\n include: Array | undefined,\n exclude: Array | undefined,\n alter: Record> | undefined,\n inject: Array> | undefined,\n swap: Record | undefined,\n inspect: Array> | undefined,\n) => {\n const propIds = include ? include : Object.keys(object);\n const excludeSet = new Set(exclude ?? []);\n const result = propIds.reduce((tmp: Record, propId) => {\n if (!excludeSet.has(propId)) {\n const mapping = alter && alter[propId];\n if (mapping && mapping[object[propId]]) {\n tmp[propId] = mapping[object[propId]];\n } else {\n tmp[propId] = object[propId];\n }\n }\n return tmp;\n }, {});\n\n if (inject) {\n inject.forEach((item) => {\n if (item.index === undefined || item.index === index) {\n result[item.propId] = arrayInputs[item.from];\n }\n });\n }\n if (inspect) {\n inspect.forEach((item) => {\n const value = arrayInputs[item.from ?? 1]; // default is arrayInputs[1]\n if (item.equal) {\n result[item.propId] = item.equal === value;\n } else if (item.notEqual) {\n result[item.propId] = item.notEqual !== value;\n }\n });\n }\n if (swap) {\n Object.keys(swap).forEach((key) => {\n const tmp = result[key];\n result[key] = result[swap[key]];\n result[swap[key]] = tmp;\n });\n }\n return result;\n};\n\nexport const propertyFilterAgent: AgentFunction<{\n include?: Array;\n exclude?: Array;\n alter?: Record>;\n inject?: Array>;\n inspect?: Array>;\n swap?: Record;\n}> = async ({ namedInputs, params }) => {\n const { include, exclude, alter, inject, swap, inspect } = params;\n const { array, item } = namedInputs;\n if (array) {\n // This is advanced usage, including \"inject\" and \"inspect\", which uses\n // array[1], array[2], ...\n const [target] = array; // Extract the first one\n if (Array.isArray(target)) {\n return target.map((item, index) => applyFilter(item, index, array, include, exclude, alter, inject, swap, inspect));\n }\n return applyFilter(target, 0, array, include, exclude, alter, inject, swap, inspect);\n } else if (item) {\n return applyFilter(item, 0, [], include, exclude, alter, inject, swap, inspect);\n }\n return false;\n};\n\nconst testInputs = {\n array: [\n [\n { color: \"red\", model: \"Model 3\", type: \"EV\", maker: \"Tesla\", range: 300 },\n { color: \"blue\", model: \"Model Y\", type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n \"Tesla Motors\",\n ],\n};\n\nconst propertyFilterAgentInfo: AgentFunctionInfo = {\n name: \"propertyFilterAgent\",\n agent: propertyFilterAgent,\n mock: propertyFilterAgent,\n inputs: {\n type: \"object\",\n },\n output: {\n type: \"any\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to apply filter\",\n },\n item: {\n type: \"object\",\n description: \"the object to apply filter\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [testInputs.array[0][0]] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: testInputs,\n params: { include: [\"color\", \"model\"] },\n result: [\n { color: \"red\", model: \"Model 3\" },\n { color: \"blue\", model: \"Model Y\" },\n ],\n },\n {\n inputs: testInputs,\n params: { exclude: [\"color\", \"model\"] },\n result: [\n { type: \"EV\", maker: \"Tesla\", range: 300 },\n { type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { exclude: [\"color\", \"model\"] },\n result: { type: \"EV\", maker: \"Tesla\", range: 300 },\n },\n {\n inputs: testInputs,\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: [\n {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n {\n color: \"red\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { swap: { maker: \"model\" } },\n result: [\n {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model Y\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { swap: { maker: \"model\" } },\n result: {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1, index: 0 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: {\n inspect: [\n { propId: \"isTesla\", equal: \"Tesla Motors\" }, // from: 1 is implied\n { propId: \"isGM\", notEqual: \"Tesla Motors\", from: 1 },\n ],\n },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n isTesla: true,\n isGM: false,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n isTesla: true,\n isGM: false,\n },\n ],\n },\n ],\n description: \"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default propertyFilterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copyAgent: AgentFunction<{\n namedKey?: string;\n}> = async ({ namedInputs, params }) => {\n const { namedKey } = params;\n assert(isNamedInputs(namedInputs), \"copyAgent: namedInputs is UNDEFINED!\");\n if (namedKey) {\n return namedInputs[namedKey];\n }\n return namedInputs;\n};\n\nconst copyAgentInfo: AgentFunctionInfo = {\n name: \"copyAgent\",\n agent: copyAgent,\n mock: copyAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n samples: [\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: {},\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { array: [\"Hello World\", \"Discarded\"] },\n params: {},\n result: { array: [\"Hello World\", \"Discarded\"] },\n },\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: { namedKey: \"color\" },\n result: \"red\",\n },\n ],\n description: \"Returns namedInputs\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default copyAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const vanillaFetchAgent: AgentFunction<{ debug?: boolean; type?: string; throwError?: boolean }, any, any> = async ({ namedInputs, params }) => {\n const { url, method, queryParams, headers, body } = namedInputs;\n const throwError = params.throwError ?? false;\n\n const url0 = new URL(url);\n const headers0 = headers ? { ...headers } : {};\n\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n url0.search = params.toString();\n }\n\n if (body) {\n headers0[\"Content-Type\"] = \"application/json\";\n }\n\n const fetchOptions: RequestInit = {\n method: (method ?? body) ? \"POST\" : \"GET\",\n headers: new Headers(headers0),\n body: body ? JSON.stringify(body) : undefined,\n };\n\n if (params?.debug) {\n return {\n url: url0.toString(),\n method: fetchOptions.method,\n headers: headers0,\n body: fetchOptions.body,\n };\n }\n\n const response = await fetch(url0.toString(), fetchOptions);\n\n if (!response.ok) {\n const status = response.status;\n const type = params?.type ?? \"json\";\n const error = type === \"json\" ? await response.json() : await response.text();\n if (throwError) {\n throw new Error(`HTTP error: ${status}`);\n }\n return {\n onError: {\n message: `HTTP error: ${status}`,\n status,\n error,\n },\n };\n }\n\n const result = await (async () => {\n const type = params?.type ?? \"json\";\n if (type === \"json\") {\n return await response.json();\n } else if (type === \"text\") {\n return response.text();\n }\n throw new Error(`Unknown Type! ${type}`);\n })();\n\n return result;\n};\n\nconst vanillaFetchAgentInfo: AgentFunctionInfo = {\n name: \"vanillaFetchAgent\",\n agent: vanillaFetchAgent,\n mock: vanillaFetchAgent,\n inputs: {\n type: \"object\",\n properties: {\n url: {\n type: \"string\",\n description: \"baseurl\",\n },\n method: {\n type: \"string\",\n description: \"HTTP method\",\n },\n headers: {\n type: \"object\",\n description: \"HTTP headers\",\n },\n quaryParams: {\n type: \"object\",\n description: \"Query parameters\",\n },\n body: {\n anyOf: [{ type: \"string\" }, { type: \"object\" }],\n description: \"body\",\n },\n },\n required: [\"url\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: { url: \"https://www.google.com\", queryParams: { foo: \"bar\" }, headers: { \"x-myHeader\": \"secret\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"GET\",\n url: \"https://www.google.com/?foo=bar\",\n headers: {\n \"x-myHeader\": \"secret\",\n },\n body: undefined,\n },\n },\n {\n inputs: { url: \"https://www.google.com\", body: { foo: \"bar\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"POST\",\n url: \"https://www.google.com/\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ foo: \"bar\" }),\n },\n },\n ],\n description: \"Retrieves JSON data from the specified URL\",\n category: [\"service\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default vanillaFetchAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const sleeperAgent: AgentFunction<{ duration?: number }> = async ({ params, namedInputs }) => {\n await sleep(params?.duration ?? 10);\n return namedInputs;\n};\n\nconst sleeperAgentInfo: AgentFunctionInfo = {\n name: \"sleeperAgent\",\n agent: sleeperAgent,\n mock: sleeperAgent,\n samples: [\n {\n inputs: {},\n params: { duration: 1 },\n result: {},\n },\n {\n inputs: { array: [{ a: 1 }, { b: 2 }] },\n params: { duration: 1 },\n result: {\n array: [{ a: 1 }, { b: 2 }],\n },\n },\n ],\n description: \"sleeper Agent\",\n category: [\"sleeper\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sleeperAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\ntype CompareDataItem = string | number | boolean | CompareData;\ntype CompareData = CompareDataItem[];\n\nconst compare = (_array: CompareData): boolean => {\n if (_array.length !== 3) {\n throw new Error(`compare inputs length must must be 3`);\n }\n const array = _array.map((value) => {\n if (Array.isArray(value)) {\n return compare(value);\n }\n return value;\n });\n const [a, operator, b] = array;\n if (operator === \"==\") {\n return a === b;\n }\n if (operator === \"!=\") {\n return a !== b;\n }\n if (operator === \">\") {\n return Number(a) > Number(b);\n }\n if (operator === \">=\") {\n return Number(a) >= Number(b);\n }\n if (operator === \"<\") {\n return Number(a) < Number(b);\n }\n if (operator === \"<=\") {\n return Number(a) <= Number(b);\n }\n if (operator === \"||\") {\n return !!a || !!b;\n }\n if (operator === \"&&\") {\n return !!a && !!b;\n }\n if (operator === \"XOR\") {\n return !!a === !b;\n }\n throw new Error(`unknown compare operator`);\n};\n\nexport const compareAgent: AgentFunction = async ({ namedInputs, params }) => {\n const ret = compare(namedInputs.array);\n if (params?.value) {\n return params?.value[ret ? \"true\" : \"false\"] ?? ret;\n }\n return ret;\n};\n\nconst compareAgentInfo: AgentFunctionInfo = {\n name: \"compareAgent\",\n agent: compareAgent,\n mock: compareAgent,\n inputs: {},\n output: {},\n samples: [\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"a\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abca\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"b\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abcd\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abc\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abcd\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"15\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">\", 15] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \">=\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 10\n inputs: { array: [\"10\", \">=\", \"19\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">=\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 19] },\n params: {},\n result: false,\n },\n //\n\n {\n inputs: { array: [\"10\", \"<\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<\", \"15\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<\", 15] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 20\n inputs: { array: [\"10\", \"<=\", \"19\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 19] },\n params: {},\n result: true,\n },\n\n {\n inputs: { array: [true, \"||\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"||\", false] },\n params: {},\n result: false,\n },\n\n {\n inputs: { array: [true, \"&&\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"&&\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [true, \"XOR\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"XOR\", true] },\n params: {},\n result: false,\n },\n //\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"||\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [[[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"bbb\", \"==\", \"bbb\"]], \"||\", [\"aaa\", \"&&\", \"bbb\"]] },\n params: {},\n result: true,\n },\n ],\n description: \"compare\",\n category: [\"compare\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default compareAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\n// https://platform.openai.com/docs/guides/vision\nconst getImageUrl = (data: string, imageType: string, detail?: string) => {\n if (imageType === \"http\") {\n return {\n url: data,\n };\n }\n const dataUrl = `data:image/${imageType};base64,${data}`;\n return {\n url: dataUrl,\n detail: detail ?? \"auto\",\n };\n};\n\ntype Content = { type: string; image_url: { url: string; detail?: string } } | { type: string; text: string };\n\nexport const images2messageAgent: AgentFunction<\n {\n imageType: string;\n detail?: string;\n },\n {\n message: {\n role: \"user\";\n content: Content[];\n };\n },\n {\n array: string[];\n prompt?: string;\n }\n> = async ({ namedInputs, params }) => {\n const { imageType, detail } = params;\n const { array, prompt } = namedInputs;\n arrayValidate(\"images2messageAgent\", namedInputs);\n assert(!!imageType, \"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...\");\n\n const contents: Content[] = array.map((base64ImageData) => {\n const image_url = getImageUrl(base64ImageData, imageType, detail);\n return {\n type: \"image_url\",\n image_url,\n };\n });\n\n if (prompt) {\n contents.unshift({ type: \"text\", text: prompt });\n }\n\n return {\n message: {\n role: \"user\",\n content: contents,\n },\n };\n};\n\nconst images2messageAgentInfo: AgentFunctionInfo = {\n name: \"images2messageAgent\",\n agent: images2messageAgent,\n mock: images2messageAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of base64 image data\",\n },\n prompt: {\n type: \"string\",\n description: \"prompt message\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [\"abcabc\", \"122123\"] },\n params: { imageType: \"png\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"abcabc\", \"122123\"], prompt: \"hello\" },\n params: { imageType: \"jpg\", detail: \"high\" },\n result: {\n message: {\n content: [\n {\n type: \"text\",\n text: \"hello\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"http://example.com/1.jpg\", \"http://example.com/2.jpg\"] },\n params: { imageType: \"http\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n url: \"http://example.com/1.jpg\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n url: \"http://example.com/2.jpg\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n ],\n description: \"Returns the message data for llm include image\",\n category: [\"image\"],\n author: \"Receptron team\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default images2messageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\n// Type for OpenAI's Embedding API\ninterface EmbeddingResponse {\n object: string;\n model: string;\n usage: {\n prompt_tokens: number;\n total_tokens: number;\n };\n data: [\n {\n object: string;\n index: number;\n embedding: number[];\n },\n ];\n}\n\nconst defaultEmbeddingModel = \"text-embedding-3-small\";\nconst OpenAI_embedding_API = \"https://api.openai.com/v1/embeddings\";\n\n// This agent retrieves embedding vectors for an array of strings using OpenAI's API\n//\n// Parameters:\n// model: Specifies the model (default is \"text-embedding-3-small\")\n// NamedInputs:\n// array: Array\n// item: string,\n// Result:\n// contents: Array>\n//\nexport const stringEmbeddingsAgent: AgentFunction<\n {\n model?: string;\n },\n number[][],\n { array: Array; item: string }\n> = async ({ params, namedInputs }) => {\n const { array, item } = namedInputs;\n\n const sources = array ?? [item];\n const apiKey = process.env.OPENAI_API_KEY;\n if (!apiKey) {\n throw new Error(\"OPENAI_API_KEY key is not set in environment variables.\");\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${apiKey}`,\n };\n\n const response = await fetch(OpenAI_embedding_API, {\n method: \"POST\",\n headers: headers,\n body: JSON.stringify({\n input: sources,\n model: params?.model ?? defaultEmbeddingModel,\n }),\n });\n const jsonResponse: EmbeddingResponse = await response.json();\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const embeddings = jsonResponse.data.map((object) => {\n return object.embedding;\n });\n return embeddings;\n};\n\nconst stringEmbeddingsAgentInfo: AgentFunctionInfo = {\n name: \"stringEmbeddingsAgent\",\n agent: stringEmbeddingsAgent,\n mock: stringEmbeddingsAgent,\n samples: [],\n description: \"Embeddings Agent\",\n category: [\"embedding\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringEmbeddingsAgentInfo;\n"],"names":["arrayValidate","isNamedInputs"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,IAAI;AAEtB,MAAM,mBAAmB,GAc5B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAI;AACpC,IAAA,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,gDAAgD,CAAC;AACvE,IAAA,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI;AAC/B,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,gBAAgB;AACtD,IAAA,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,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AqB;SAC9C,CAAC;AACH,KAAA,CAAC;AACF,IAAA,MAAM,YAAY,GAAsB,MAAM,QAAQ,CAAC,IAAI,EAAE;AAE7D,IAAA,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,CAAA,oBAAA,EAAuB,QAAQ,CAAC,MAAM,CAAE,CAAA,CAAC;;IAE3D,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAI;QAClD,OAAO,MAAM,CAAC,SAAS;AACzB,KAAC,CAAC;AACF,IAAA,OAAO,UAAU;AACnB,CAAC;AAED,MAAM,yBAAyB,GAAsB;AACnD,IAAA,IAAI,EAAE,uBAAuB;AAC7B,IAAA,KAAK,EAAE,qBAAqB;AAC5B,IAAA,IAAI,EAAE,qBAAqB;AAC3B,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,WAAW,EAAE,kBAAkB;IAC/B,QAAQ,EAAE,CAAC,WAAW,CAAC;AACvB,IAAA,MAAM,EAAE,gBAAgB;AACxB,IAAA,UAAU,EAAE,sCAAsC;AAClD,IAAA,OAAO,EAAE,KAAK;;;;;"} \ No newline at end of file +{"version":3,"file":"bundle.esm.js","sources":["../src/string_agents/string_splitter_agent.ts","../src/string_agents/string_template_agent.ts","../src/string_agents/json_parser_agent.ts","../src/string_agents/string_case_variants_agent.ts","../src/graph_agents/nested_agent.ts","../src/string_agents/update_text_agent.ts","../../agent_utils/lib/index.js","../src/array_agents/push_agent.ts","../src/array_agents/pop_agent.ts","../src/array_agents/shift_agent.ts","../src/array_agents/array_flat_agent.ts","../src/array_agents/array_join_agent.ts","../src/matrix_agents/dot_product_agent.ts","../src/matrix_agents/sort_by_values_agent.ts","../src/test_agents/echo_agent.ts","../src/test_agents/counting_agent.ts","../src/test_agents/copy_message_agent.ts","../src/test_agents/copy2array_agent.ts","../src/test_agents/merge_node_id_agent.ts","../src/test_agents/stream_mock_agent.ts","../src/graph_agents/map_agent.ts","../src/data_agents/total_agent.ts","../src/data_agents/data_sum_template_agent.ts","../src/data_agents/property_filter_agent.ts","../src/data_agents/copy_agent.ts","../src/service_agents/vanilla_fetch_agent.ts","../src/sleeper_agents/sleeper_agent.ts","../src/compare_agents/compare_agent.ts","../src/images_agents/image_to_message_agent.ts","../src/embedding_agent.ts"],"sourcesContent":["import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent strip one long string into chunks using following parameters\n//\n// chunkSize: number; // default is 2048\n// overlap: number; // default is 1/8th of chunkSize.\n//\n// see example\n// tests/agents/test_string_agent.ts\n//\nconst defaultChunkSize = 2048;\n\nexport const stringSplitterAgent: AgentFunction<\n {\n chunkSize?: number;\n overlap?: number;\n },\n {\n contents: Array;\n count: number;\n chunkSize: number;\n overlap: number;\n },\n {\n text: string;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"stringSplitterAgent: namedInputs is UNDEFINED!\");\n const source = namedInputs.text;\n const chunkSize = params.chunkSize ?? defaultChunkSize;\n const overlap = params.overlap ?? Math.floor(chunkSize / 8);\n const count = Math.floor(source.length / (chunkSize - overlap)) + 1;\n const contents = new Array(count).fill(undefined).map((_, i) => {\n const startIndex = i * (chunkSize - overlap);\n return source.substring(startIndex, startIndex + chunkSize);\n });\n\n return { contents, count, chunkSize, overlap };\n};\n\n// for test and document\nconst sampleInput = {\n text: \"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do.\",\n};\n\nconst sampleParams = { chunkSize: 64 };\nconst sampleResult = {\n contents: [\n \"Here's to the crazy ones, the misfits, the rebels, the troublema\",\n \"roublemakers, the round pegs in the square holes ... the ones wh\",\n \" ones who see things differently -- they're not fond of rules, a\",\n \"rules, and they have no respect for the status quo. ... You can \",\n \"You can quote them, disagree with them, glorify or vilify them, \",\n \"y them, but the only thing you can't do is ignore them because t\",\n \"ecause they change things. ... They push the human race forward,\",\n \"forward, and while some may see them as the crazy ones, we see g\",\n \"we see genius, because the people who are crazy enough to think \",\n \"o think that they can change the world, are the ones who do.\",\n \" do.\",\n ],\n count: 11,\n chunkSize: 64,\n overlap: 8,\n};\n\nconst stringSplitterAgentInfo: AgentFunctionInfo = {\n name: \"stringSplitterAgent\",\n agent: stringSplitterAgent,\n mock: stringSplitterAgent,\n inputs: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"text to be chuncked\",\n },\n },\n required: [\"text\"],\n },\n output: {\n type: \"object\",\n properties: {\n contents: {\n type: \"array\",\n description: \"the array of text chunks\",\n },\n count: {\n type: \"number\",\n description: \"the number of chunks\",\n },\n chunkSize: {\n type: \"number\",\n description: \"the chunk size\",\n },\n overlap: {\n type: \"number\",\n description: \"the overlap size\",\n },\n },\n },\n samples: [\n {\n inputs: sampleInput,\n params: sampleParams,\n result: sampleResult,\n },\n ],\n description: \"This agent strip one long string into chunks using following parameters\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringSplitterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, isObject } from \"graphai\";\n\ntype StringTemplate = string | Record;\ntype StringTemplateObject = StringTemplate | StringTemplate[] | Record;\n\nconst processTemplate: any = (template: StringTemplateObject, match: string, input: string) => {\n if (typeof template === \"string\") {\n if (template === match) {\n return input;\n }\n return template.replace(match, input);\n } else if (Array.isArray(template)) {\n return template.map((item: StringTemplate) => processTemplate(item, match, input));\n }\n\n if (isObject(template)) {\n return Object.keys(template).reduce((tmp: any, key: string) => {\n tmp[key] = processTemplate(template[key], match, input);\n return tmp;\n }, {});\n }\n return template;\n};\n\nexport const stringTemplateAgent: AgentFunction<\n {\n template: StringTemplateObject;\n },\n StringTemplateObject,\n Record\n> = async ({ params, namedInputs }) => {\n if (params.template === undefined) {\n if (namedInputs.text) {\n return namedInputs.text;\n }\n console.warn(\"warning: stringTemplateAgent no template\");\n }\n return Object.keys(namedInputs).reduce((template, key) => {\n return processTemplate(template, \"${\" + key + \"}\", namedInputs[key]);\n }, params.template);\n};\n\nconst sampleNamedInput = { message1: \"hello\", message2: \"test\" };\n\n// for test and document\nconst stringTemplateAgentInfo: AgentFunctionInfo = {\n name: \"stringTemplateAgent\",\n agent: stringTemplateAgent,\n mock: stringTemplateAgent,\n samples: [\n // named\n {\n inputs: sampleNamedInput,\n params: { template: \"${message1}: ${message2}\" },\n result: \"hello: test\",\n },\n {\n inputs: sampleNamedInput,\n params: { template: [\"${message1}: ${message2}\", \"${message2}: ${message1}\"] },\n result: [\"hello: test\", \"test: hello\"],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: \"${message2}\" } },\n result: { apple: \"hello\", lemon: \"test\" },\n },\n {\n inputs: sampleNamedInput,\n params: { template: [{ apple: \"${message1}\", lemon: \"${message2}\" }] },\n result: [{ apple: \"hello\", lemon: \"test\" }],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: [\"${message2}\"] } },\n result: { apple: \"hello\", lemon: [\"test\"] },\n },\n // graphData\n {\n inputs: { agent: \"openAiAgent\", row: \"hello world\", params: { text: \"message\" } },\n params: {\n template: {\n version: 0.5,\n nodes: {\n ai: {\n agent: \"${agent}\",\n isResult: true,\n params: \"${params}\",\n inputs: { prompt: \"${row}\" },\n },\n },\n },\n },\n result: {\n nodes: {\n ai: {\n agent: \"openAiAgent\",\n inputs: {\n prompt: \"hello world\",\n },\n isResult: true,\n params: { text: \"message\" },\n },\n },\n version: 0.5,\n },\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const jsonParserAgent: AgentFunction<\n null,\n unknown,\n {\n text: string;\n data: unknown;\n }\n> = async ({ namedInputs }) => {\n const { text, data } = namedInputs;\n\n if (data) {\n return JSON.stringify(data, null, 2);\n }\n const match = (\"\\n\" + text).match(/\\n```[a-zA-z]*([\\s\\S]*?)\\n```/);\n if (match) {\n return JSON.parse(match[1]);\n }\n return JSON.parse(text);\n};\n\nconst sample_object = { apple: \"red\", lemon: \"yellow\" };\n\nconst json_str = JSON.stringify(sample_object);\nconst md_json1 = [\"```\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json2 = [\"```json\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json3 = [\"```JSON\", json_str, \"```\"].join(\"\\n\");\n\nconst jsonParserAgentInfo: AgentFunctionInfo = {\n name: \"jsonParserAgent\",\n agent: jsonParserAgent,\n mock: jsonParserAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n type: \"string\",\n },\n samples: [\n {\n inputs: { data: sample_object },\n params: {},\n result: JSON.stringify(sample_object, null, 2),\n },\n {\n inputs: { text: JSON.stringify(sample_object, null, 2) },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json1 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json2 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json3 },\n params: {},\n result: sample_object,\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default jsonParserAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const stringCaseVariantsAgent: AgentFunction<\n { suffix?: string },\n { lowerCamelCase: string; snakeCase: string; kebabCase: string; normalized: string },\n { text: string }\n> = async ({ namedInputs, params }) => {\n const { suffix } = params;\n const normalizedArray = namedInputs.text\n .trim()\n .replace(/[\\s-_]+/g, \" \")\n .toLowerCase()\n .split(\" \");\n if (suffix && normalizedArray[normalizedArray.length - 1] !== suffix) {\n normalizedArray.push(suffix);\n }\n const normalized = normalizedArray.join(\" \");\n\n const lowerCamelCase = normalizedArray\n .map((word, index) => {\n if (index === 0) return word;\n return word.charAt(0).toUpperCase() + word.slice(1);\n })\n .join(\"\");\n\n const snakeCase = normalized.replace(/\\s+/g, \"_\");\n const kebabCase = normalized.replace(/\\s+/g, \"-\");\n\n return { lowerCamelCase, snakeCase, kebabCase, normalized };\n};\n\nconst stringCaseVariantsAgentInfo: AgentFunctionInfo = {\n name: \"stringCaseVariantsAgent\",\n agent: stringCaseVariantsAgent,\n mock: stringCaseVariantsAgent,\n samples: [\n {\n inputs: { text: \"this is a pen\" },\n params: {},\n result: {\n kebabCase: \"this-is-a-pen\",\n lowerCamelCase: \"thisIsAPen\",\n normalized: \"this is a pen\",\n snakeCase: \"this_is_a_pen\",\n },\n },\n {\n inputs: { text: \"string case variants\" },\n params: { suffix: \"agent\" },\n result: {\n kebabCase: \"string-case-variants-agent\",\n lowerCamelCase: \"stringCaseVariantsAgent\",\n normalized: \"string case variants agent\",\n snakeCase: \"string_case_variants_agent\",\n },\n },\n ],\n description: \"Format String Cases agent\",\n category: [\"string\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringCaseVariantsAgentInfo;\n","import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, StaticNodeData, GraphData } from \"graphai\";\nimport { GraphAI, assert, graphDataLatestVersion } from \"graphai\";\n\ntype NestedAgentGeneratorOption = {\n resultNodeId: string;\n};\nexport const nestedAgentGenerator: (graphData: GraphData, options?: NestedAgentGeneratorOption) => (context: AgentFunctionContext) => Promise = (\n graphData: GraphData,\n options?: NestedAgentGeneratorOption,\n) => {\n return async (context: AgentFunctionContext) => {\n const { namedInputs, log, debugInfo, params, forNestedGraph } = context;\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n const throwError = params.throwError ?? false;\n if (taskManager) {\n const status = taskManager.getStatus(false);\n assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`);\n }\n assert(!!graphData, \"nestedAgent: graph is required\");\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n if (nodeIds.length > 0) {\n nodeIds.forEach((nodeId) => {\n if (nestedGraphData.nodes[nodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] };\n } else {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n (nestedGraphData.nodes[nodeId] as StaticNodeData)[\"value\"] = namedInputs[nodeId];\n }\n });\n }\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n\n const results = await graphAI.run(false);\n log?.push(...graphAI.transactionLogs());\n\n if (options && options.resultNodeId) {\n return results[options.resultNodeId];\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n };\n};\n\nexport const nestedAgent: AgentFunction<{ throwError?: boolean }> = async (context) => {\n const { forNestedGraph } = context;\n const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } };\n assert(!!graphData, \"No GraphData\");\n\n return await nestedAgentGenerator(graphData)(context);\n};\n\nconst nestedAgentInfo: AgentFunctionInfo = {\n name: \"nestedAgent\",\n agent: nestedAgent,\n mock: nestedAgent,\n samples: [\n {\n inputs: {\n message: \"hello\",\n },\n params: {},\n result: {\n test: [\"hello\"],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"messages\" },\n inputs: { messages: [\":message\"] },\n isResult: true,\n },\n },\n },\n },\n ],\n description: \"nested Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default nestedAgentInfo;\n","import { nestedAgentGenerator } from \"@/generator\";\nimport { graphDataLatestVersion } from \"graphai\";\n\nconst updateTextGraph = {\n version: graphDataLatestVersion,\n nodes: {\n isNewText: {\n if: \":newText\",\n agent: \"copyAgent\",\n inputs: {\n text: \":newText\",\n },\n },\n isOldText: {\n unless: \":newText\",\n agent: \"copyAgent\",\n inputs: {\n text: \":oldText\",\n },\n },\n updatedText: {\n agent: \"copyAgent\",\n anyInput: true,\n inputs: {\n text: [\":isNewText.text\", \":isOldText.text\"],\n },\n },\n resultText: {\n isResult: true,\n agent: \"copyAgent\",\n anyInput: true,\n inputs: {\n text: \":updatedText.text.$0\",\n },\n },\n },\n};\n\nconst updateTextAgent = nestedAgentGenerator(updateTextGraph, { resultNodeId: \"resultText\" });\n\nconst updateTextAgentInfo = {\n name: \"updateTextAgent\",\n agent: updateTextAgent,\n mock: updateTextAgent,\n samples: [\n {\n inputs: { newText: \"new\", oldText: \"old\" },\n params: {},\n result: { text: \"new\" },\n },\n {\n inputs: { newText: \"\", oldText: \"old\" },\n params: {},\n result: { text: \"old\" },\n },\n ],\n description: \"\",\n category: [],\n author: \"\",\n repository: \"\",\n tools: [],\n license: \"\",\n hasGraphData: true,\n};\n\nexport default updateTextAgentInfo;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.arrayValidate = exports.isNamedInputs = exports.sample2GraphData = void 0;\nconst graphai_1 = require(\"graphai\");\nconst sample2GraphData = (sample, agentName) => {\n const nodes = {};\n const inputs = (() => {\n if (Array.isArray(sample.inputs)) {\n Array.from(sample.inputs.keys()).forEach((key) => {\n nodes[\"sampleInput\" + key] = {\n value: sample.inputs[key],\n };\n });\n return Object.keys(nodes).map((k) => \":\" + k);\n }\n nodes[\"sampleInput\"] = {\n value: sample.inputs,\n };\n return Object.keys(sample.inputs).reduce((tmp, key) => {\n tmp[key] = `:sampleInput.` + key;\n return tmp;\n }, {});\n })();\n nodes[\"node\"] = {\n isResult: true,\n agent: agentName,\n params: sample.params,\n inputs: inputs,\n graph: sample.graph,\n };\n const graphData = {\n version: 0.5,\n nodes,\n };\n return graphData;\n};\nexports.sample2GraphData = sample2GraphData;\nconst isNamedInputs = (namedInputs) => {\n return Object.keys(namedInputs || {}).length > 0;\n};\nexports.isNamedInputs = isNamedInputs;\nconst arrayValidate = (agentName, namedInputs, extra_message = \"\") => {\n (0, graphai_1.assert)((0, exports.isNamedInputs)(namedInputs), `${agentName}: namedInputs is UNDEFINED!` + extra_message);\n (0, graphai_1.assert)(!!namedInputs.array, `${agentName}: namedInputs.array is UNDEFINED!` + extra_message);\n (0, graphai_1.assert)(Array.isArray(namedInputs.array), `${agentName}: namedInputs.array is not Array.` + extra_message);\n};\nexports.arrayValidate = arrayValidate;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const pushAgent: AgentFunction }, { array: Array; item?: unknown; items: Array }> = async ({\n namedInputs,\n}) => {\n const extra_message = \" Set inputs: { array: :arrayNodeId, item: :itemNodeId }\";\n arrayValidate(\"pushAgent\", namedInputs, extra_message);\n const { item, items } = namedInputs;\n assert(!!(item || items), \"pushAgent: namedInputs.item is UNDEFINED!\" + extra_message);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n if (item) {\n array.push(item);\n } else {\n items.forEach((item) => {\n array.push(item);\n });\n }\n return {\n array,\n };\n};\n\nconst pushAgentInfo: AgentFunctionInfo = {\n name: \"pushAgent\",\n agent: pushAgent,\n mock: pushAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to push an item to\",\n },\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n items: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2], item: 3 },\n params: {},\n result: { array: [1, 2, 3] },\n },\n {\n inputs: { array: [{ apple: 1 }], item: { lemon: 2 } },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }] },\n },\n {\n inputs: { array: [{ apple: 1 }], items: [{ lemon: 2 }, { banana: 3 }] },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }, { banana: 3 }] },\n },\n ],\n description: \"push Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default pushAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const popAgent: AgentFunction; item: unknown }, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"popAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.pop();\n return { array, item };\n};\n\nconst popAgentInfo: AgentFunctionInfo = {\n name: \"popAgent\",\n agent: popAgent,\n mock: popAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to pop an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item popped from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"a\", \"b\"],\n item: \"c\",\n },\n },\n {\n inputs: {\n array: [1, 2, 3],\n array2: [\"a\", \"b\", \"c\"],\n },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n ],\n description: \"Pop Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default popAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const shiftAgent: AgentFunction, Record, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"shiftAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.shift();\n return { array, item };\n};\n\nconst shiftAgentInfo: AgentFunctionInfo = {\n name: \"shiftAgent\",\n agent: shiftAgent,\n mock: shiftAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to shift an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item shifted from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [2, 3],\n item: 1,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"b\", \"c\"],\n item: \"a\",\n },\n },\n ],\n description: \"shift Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default shiftAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayFlatAgent: AgentFunction<{ depth?: number }, { array: Array }, { array: Array }> = async ({ namedInputs, params }) => {\n arrayValidate(\"arrayFlatAgent\", namedInputs);\n const depth = params.depth ?? 1;\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n return { array: array.flat(depth) };\n};\n\nconst arrayFlatAgentInfo: AgentFunctionInfo = {\n name: \"arrayFlatAgent\",\n agent: arrayFlatAgent,\n mock: arrayFlatAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"flat array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n params: {\n type: \"object\",\n properties: {\n depth: {\n type: \"number\",\n description: \"array depth\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n array: [1, 2, [3]],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: { depth: 2 },\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n array: [\"a\", \"b\", \"c\"],\n },\n },\n ],\n description: \"Array Flat Agent\",\n category: [\"array\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n cacheType: \"pureAgent\",\n license: \"MIT\",\n};\nexport default arrayFlatAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayJoinAgent: AgentFunction<{ separator?: string; flat?: number }, { text: string }, { array: Array }> = async ({\n namedInputs,\n params,\n}) => {\n arrayValidate(\"arrayJoinAgent\", namedInputs);\n const separator = params.separator ?? \"\";\n const { flat } = params;\n\n const text = flat ? namedInputs.array.flat(flat).join(separator) : namedInputs.array.join(separator);\n return { text };\n};\n\nconst arrayJoinAgentInfo: AgentFunctionInfo = {\n name: \"arrayJoinAgent\",\n agent: arrayJoinAgent,\n mock: arrayJoinAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"array join\",\n },\n },\n required: [\"array\"],\n },\n params: {\n type: \"object\",\n properties: {\n separator: {\n type: \"string\",\n description: \"array join separator\",\n },\n flat: {\n type: \"number\",\n description: \"array flat depth\",\n },\n },\n },\n output: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"joined text\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n text: \"abc\",\n },\n },\n //\n {\n inputs: { array: [[1], [2], [3]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 2 },\n result: {\n text: \"1|2|3\",\n },\n },\n ],\n description: \"Array Join Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default arrayJoinAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent calculates the dot product of an array of vectors (A[]) and a vector (B),\n// typically used to calculate cosine similarity of embedding vectors.\n// Inputs:\n// matrix: Two dimentional array of numbers.\n// vector: One dimentional array of numbers.\n// Outputs:\n// { contents: Array } // array of docProduct of each vector (A[]) and vector B\nexport const dotProductAgent: AgentFunction, Array, { matrix: Array>; vector: Array }> = async ({\n namedInputs,\n}) => {\n assert(!!namedInputs, \"dotProductAgent: namedInputs is UNDEFINED!\");\n const matrix = namedInputs.matrix as Array>;\n const vector = namedInputs.vector as Array;\n if (matrix[0].length != vector.length) {\n throw new Error(`dotProduct: Length of vectors do not match. ${matrix[0].length}, ${vector.length}`);\n }\n const contents = matrix.map((vector0) => {\n return vector0.reduce((dotProduct: number, value, index) => {\n return dotProduct + value * vector[index];\n }, 0);\n });\n return contents;\n};\n\nconst dotProductAgentInfo: AgentFunctionInfo = {\n name: \"dotProductAgent\",\n agent: dotProductAgent,\n mock: dotProductAgent,\n inputs: {\n type: \"object\",\n properties: {\n matrix: {\n type: \"array\",\n description: \"two dimentional matrix\",\n items: {\n type: \"array\",\n items: {\n type: \"number\",\n },\n },\n },\n vector: {\n type: \"array\",\n description: \"the vector\",\n items: {\n type: \"number\",\n },\n },\n },\n required: [\"matrix\", \"vector\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n matrix: [\n [1, 2],\n [3, 4],\n [5, 6],\n ],\n vector: [3, 2],\n },\n params: {},\n result: [7, 17, 27],\n },\n {\n inputs: {\n matrix: [\n [1, 2],\n [2, 3],\n ],\n vector: [1, 2],\n },\n params: {},\n result: [5, 8],\n },\n ],\n description: \"dotProduct Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dotProductAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent returned a sorted array of one array (A) based on another array (B).\n// The default sorting order is \"decendant\".\n//\n// Parameters:\n// acendant: Specifies if the sorting order should be acendant. The default is \"false\" (decendant).\n// Inputs:\n// array: Array; // array to be sorted\n// values: Array; // array of numbers for sorting\n//\nexport const sortByValuesAgent: AgentFunction<\n {\n assendant?: boolean;\n },\n Array,\n {\n array: Array;\n values: Array;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"sortByValue: namedInputs is UNDEFINED!\");\n assert(!!namedInputs.array, \"sortByValue: namedInputs.array is UNDEFINED!\");\n assert(!!namedInputs.values, \"sortByValue: namedInputs.values is UNDEFINED!\");\n\n const direction = (params?.assendant ?? false) ? -1 : 1;\n const array: Array = namedInputs.array;\n const values: Array = namedInputs.values;\n const joined = array.map((item, index) => {\n return { item, value: values[index] };\n });\n const contents = joined\n .sort((a, b) => {\n return (b.value - a.value) * direction;\n })\n .map((a) => {\n return a.item;\n });\n return contents;\n};\n\nconst sortByValuesAgentInfo: AgentFunctionInfo = {\n name: \"sortByValuesAgent\",\n agent: sortByValuesAgent,\n mock: sortByValuesAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to sort\",\n },\n values: {\n type: \"array\",\n description: \"values associated with items in the array\",\n },\n },\n required: [\"array\", \"values\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {},\n result: [\"lemon\", \"orange\", \"apple\", \"banana\"],\n },\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {\n assendant: true,\n },\n result: [\"banana\", \"apple\", \"orange\", \"lemon\"],\n },\n ],\n description: \"sortByValues Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sortByValuesAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const echoAgent: AgentFunction = async ({ params, filterParams }) => {\n if (params.filterParams) {\n return filterParams;\n }\n return params;\n};\n\n// for test and document\nconst echoAgentInfo: AgentFunctionInfo = {\n name: \"echoAgent\",\n agent: echoAgent,\n mock: echoAgent,\n samples: [\n {\n inputs: {},\n params: { text: \"this is test\" },\n result: { text: \"this is test\" },\n },\n {\n inputs: {},\n params: {\n text: \"If you add filterParams option, it will respond to filterParams\",\n filterParams: true,\n },\n result: {},\n },\n ],\n description: \"Echo agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default echoAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const countingAgent: AgentFunction<{ count: number }, { list: number[] }> = async ({ params }) => {\n return {\n list: new Array(params.count).fill(undefined).map((_, i) => {\n return i;\n }),\n };\n};\n\n// for test and document\nconst countingAgentInfo: AgentFunctionInfo = {\n name: \"countingAgent\",\n agent: countingAgent,\n mock: countingAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4 },\n result: { list: [0, 1, 2, 3] },\n },\n ],\n description: \"Counting agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default countingAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const copyMessageAgent: AgentFunction<{ count: number; message: string }, { messages: string[] }> = async ({ params }) => {\n return {\n messages: new Array(params.count).fill(undefined).map(() => {\n return params.message;\n }),\n };\n};\n\n// for test and document\nconst copyMessageAgentInfo: AgentFunctionInfo = {\n name: \"copyMessageAgent\",\n agent: copyMessageAgent,\n mock: copyMessageAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4, message: \"hello\" },\n result: { messages: [\"hello\", \"hello\", \"hello\", \"hello\"] },\n },\n ],\n description: \"CopyMessage agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copyMessageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copy2ArrayAgent: AgentFunction<{ count: number }> = async ({ namedInputs, params }) => {\n assert(isNamedInputs(namedInputs), \"copy2ArrayAgent: namedInputs is UNDEFINED!\");\n const input = namedInputs.item ? namedInputs.item : namedInputs;\n return new Array(params.count).fill(undefined).map(() => {\n return input;\n });\n};\n\n// for test and document\nconst copy2ArrayAgentInfo: AgentFunctionInfo = {\n name: \"copy2ArrayAgent\",\n agent: copy2ArrayAgent,\n mock: copy2ArrayAgent,\n samples: [\n {\n inputs: { item: { message: \"hello\" } },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { message: \"hello\" },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { item: \"hello\" },\n params: { count: 10 },\n result: [\"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\"],\n },\n ],\n description: \"Copy2Array agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copy2ArrayAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const mergeNodeIdAgent: AgentFunction, { array: Record[] }> = async ({\n debugInfo: { nodeId },\n namedInputs,\n}) => {\n arrayValidate(\"mergeNodeIdAgent\", namedInputs);\n\n const dataSet = namedInputs.array;\n\n return dataSet.reduce(\n (tmp, input) => {\n return { ...tmp, ...input };\n },\n { [nodeId]: \"hello\" },\n );\n};\n\n// for test and document\nconst mergeNodeIdAgentInfo: AgentFunctionInfo = {\n name: \"mergeNodeIdAgent\",\n agent: mergeNodeIdAgent,\n mock: mergeNodeIdAgent,\n samples: [\n {\n inputs: { array: [{ message: \"hello\" }] },\n params: {},\n result: {\n message: \"hello\",\n test: \"hello\",\n },\n },\n ],\n description: \"merge node id agent\",\n category: [\"test\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default mergeNodeIdAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const streamMockAgent: AgentFunction = async ({ params, filterParams, namedInputs }) => {\n const message = params.message ?? namedInputs.message ?? \"\";\n\n for await (const token of message.split(\"\")) {\n if (filterParams.streamTokenCallback) {\n filterParams.streamTokenCallback(token);\n }\n await sleep(params.sleep || 100);\n }\n\n return { message };\n};\n\n// for test and document\nconst streamMockAgentInfo: AgentFunctionInfo = {\n name: \"streamMockAgent\",\n agent: streamMockAgent,\n mock: streamMockAgent,\n inputs: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n message: {\n type: \"string\",\n description: \"streaming message\",\n },\n },\n },\n {\n type: \"array\",\n },\n ],\n },\n samples: [\n {\n inputs: {},\n params: { message: \"this is params test\" },\n result: { message: \"this is params test\" },\n },\n {\n inputs: { message: \"this is named inputs test\" },\n params: {},\n result: { message: \"this is named inputs test\" },\n },\n ],\n description: \"Stream mock agent\",\n category: [\"test\"],\n author: \"Isamu Arimoto\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n stream: true,\n};\n\nexport default streamMockAgentInfo;\n","import { GraphAI, AgentFunction, AgentFunctionInfo, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const mapAgent: AgentFunction<\n {\n limit?: number;\n resultAll?: boolean;\n compositeResult?: boolean;\n throwError?: boolean;\n },\n Record\n> = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => {\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n\n if (taskManager) {\n const status = taskManager.getStatus();\n assert(status.concurrency > status.running, `mapAgent: Concurrency is too low: ${status.concurrency}`);\n }\n\n assert(!!namedInputs.rows, \"mapAgent: rows property is required in namedInput\");\n assert(!!graphData, \"mapAgent: graph is required\");\n\n const rows = namedInputs.rows.map((item: any) => item);\n if (params.limit && params.limit < rows.length) {\n rows.length = params.limit; // trim\n }\n const resultAll = params.resultAll ?? false;\n const throwError = params.throwError ?? false;\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n nestedGraphData.nodes[\"__mapIndex\"] = {};\n nodeIds.forEach((nodeId) => {\n const mappedNodeId = nodeId === \"rows\" ? \"row\" : nodeId;\n if (nestedGraphData.nodes[mappedNodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[mappedNodeId] = { value: namedInputs[nodeId] };\n } else if (!(\"agent\" in nestedGraphData.nodes[mappedNodeId])) {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n nestedGraphData.nodes[mappedNodeId][\"value\"] = namedInputs[nodeId];\n }\n });\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphs: Array = rows.map((row: any, index: number) => {\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n graphAI.injectValue(\"row\", row, \"__mapAgent_inputs__\");\n graphAI.injectValue(\"__mapIndex\", index, \"__mapAgent_inputs__\");\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n return graphAI;\n });\n\n const runs = graphs.map((graph) => {\n return graph.run(resultAll);\n });\n const results = await Promise.all(runs);\n const nodeIds = Object.keys(results[0]);\n // assert(nodeIds.length > 0, \"mapAgent: no return values (missing isResult)\");\n\n if (log) {\n const logs = graphs.map((graph, index) => {\n return graph.transactionLogs().map((log) => {\n log.mapIndex = index;\n return log;\n });\n });\n log.push(...logs.flat());\n }\n\n if (params.compositeResult) {\n const compositeResult = nodeIds.reduce((tmp: Record>, nodeId) => {\n tmp[nodeId] = results.map((result) => {\n return result[nodeId];\n });\n return tmp;\n }, {});\n return compositeResult;\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n};\n\nconst mapAgentInfo: AgentFunctionInfo = {\n name: \"mapAgent\",\n agent: mapAgent,\n mock: mapAgent,\n samples: [\n {\n inputs: {\n rows: [1, 2],\n },\n params: {},\n result: [{ test: [1] }, { test: [2] }],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${word}.\",\n },\n inputs: { word: \":row\" },\n isResult: true,\n },\n },\n },\n result: [\n { node2: \"I love apple.\" },\n { node2: \"I love orange.\" },\n { node2: \"I love banana.\" },\n { node2: \"I love lemon.\" },\n { node2: \"I love melon.\" },\n { node2: \"I love pineapple.\" },\n { node2: \"I love tomato.\" },\n ],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${item}.\",\n },\n inputs: { item: \":row.fruit\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"I love apple.\" }, { node2: \"I love orange.\" }],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n name: \"You\",\n verb: \"like\",\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"${name} ${verb} ${fruit}.\",\n },\n inputs: { fruit: \":row.fruit\", name: \":name\", verb: \":verb\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"You like apple.\" }, { node2: \"You like orange.\" }],\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n test: [1],\n row: 1,\n },\n {\n __mapIndex: 1,\n test: [2],\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n map: [\n {\n test: 1,\n },\n {\n test: 1,\n },\n ],\n row: 1,\n test: 1,\n },\n {\n __mapIndex: 1,\n map: [\n {\n test: 2,\n },\n {\n test: 2,\n },\n ],\n test: 2,\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n },\n },\n },\n },\n },\n },\n\n // old response\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${row}.\",\n },\n inputs: { row: \":row\" },\n isResult: true,\n },\n },\n },\n result: {\n node2: [\"I love apple.\", \"I love orange.\", \"I love banana.\", \"I love lemon.\", \"I love melon.\", \"I love pineapple.\", \"I love tomato.\"],\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n __mapIndex: [0, 1],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n __mapIndex: [0, 1],\n test: [[1], [2]],\n map: [\n {\n test: [[[1]], [[1]]],\n },\n {\n test: [[[2]], [[2]]],\n },\n ],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n },\n },\n },\n ],\n description: \"Map Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default mapAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const totalAgent: AgentFunction, Record, { array: Record[] }> = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((result, input) => {\n const inputArray = Array.isArray(input) ? input : [input];\n inputArray.forEach((innerInput) => {\n Object.keys(innerInput).forEach((key) => {\n const value = innerInput[key];\n if (result[key]) {\n result[key] += value;\n } else {\n result[key] = value;\n }\n });\n });\n return result;\n }, {});\n};\n\n//\nconst totalAgentInfo: AgentFunctionInfo = {\n name: \"totalAgent\",\n agent: totalAgent,\n mock: totalAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: { array: [[{ a: 1, b: -1 }, { c: 10 }], [{ a: 2, b: -1 }], [{ a: 3, b: -2 }, { d: -10 }]] },\n params: {},\n result: { a: 6, b: -4, c: 10, d: -10 },\n },\n {\n inputs: { array: [{ a: 1 }] },\n params: {},\n result: { a: 1 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }] },\n params: {},\n result: { a: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: {\n array: [\n { a: 1, b: 1 },\n { a: 2, b: 2 },\n { a: 3, b: 0 },\n ],\n },\n params: {},\n result: { a: 6, b: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2, b: 2 }, { a: 3, b: 0 }] },\n params: {},\n result: { a: 6, b: 2 },\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default totalAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const dataSumTemplateAgent: AgentFunction = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((tmp, input) => {\n return tmp + input;\n }, 0);\n};\n\nconst dataSumTemplateAgentInfo: AgentFunctionInfo = {\n name: \"dataSumTemplateAgent\",\n agent: dataSumTemplateAgent,\n mock: dataSumTemplateAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of numbers to calculate the sum of\",\n items: {\n type: \"integer\",\n },\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"number\",\n },\n samples: [\n {\n inputs: { array: [1] },\n params: {},\n result: 1,\n },\n {\n inputs: { array: [1, 2] },\n params: {},\n result: 3,\n },\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: 6,\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dataSumTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nconst applyFilter = (\n object: any,\n index: number,\n arrayInputs: any,\n include: Array | undefined,\n exclude: Array | undefined,\n alter: Record> | undefined,\n inject: Array> | undefined,\n swap: Record | undefined,\n inspect: Array> | undefined,\n) => {\n const propIds = include ? include : Object.keys(object);\n const excludeSet = new Set(exclude ?? []);\n const result = propIds.reduce((tmp: Record, propId) => {\n if (!excludeSet.has(propId)) {\n const mapping = alter && alter[propId];\n if (mapping && mapping[object[propId]]) {\n tmp[propId] = mapping[object[propId]];\n } else {\n tmp[propId] = object[propId];\n }\n }\n return tmp;\n }, {});\n\n if (inject) {\n inject.forEach((item) => {\n if (item.index === undefined || item.index === index) {\n result[item.propId] = arrayInputs[item.from];\n }\n });\n }\n if (inspect) {\n inspect.forEach((item) => {\n const value = arrayInputs[item.from ?? 1]; // default is arrayInputs[1]\n if (item.equal) {\n result[item.propId] = item.equal === value;\n } else if (item.notEqual) {\n result[item.propId] = item.notEqual !== value;\n }\n });\n }\n if (swap) {\n Object.keys(swap).forEach((key) => {\n const tmp = result[key];\n result[key] = result[swap[key]];\n result[swap[key]] = tmp;\n });\n }\n return result;\n};\n\nexport const propertyFilterAgent: AgentFunction<{\n include?: Array;\n exclude?: Array;\n alter?: Record>;\n inject?: Array>;\n inspect?: Array>;\n swap?: Record;\n}> = async ({ namedInputs, params }) => {\n const { include, exclude, alter, inject, swap, inspect } = params;\n const { array, item } = namedInputs;\n if (array) {\n // This is advanced usage, including \"inject\" and \"inspect\", which uses\n // array[1], array[2], ...\n const [target] = array; // Extract the first one\n if (Array.isArray(target)) {\n return target.map((item, index) => applyFilter(item, index, array, include, exclude, alter, inject, swap, inspect));\n }\n return applyFilter(target, 0, array, include, exclude, alter, inject, swap, inspect);\n } else if (item) {\n return applyFilter(item, 0, [], include, exclude, alter, inject, swap, inspect);\n }\n return false;\n};\n\nconst testInputs = {\n array: [\n [\n { color: \"red\", model: \"Model 3\", type: \"EV\", maker: \"Tesla\", range: 300 },\n { color: \"blue\", model: \"Model Y\", type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n \"Tesla Motors\",\n ],\n};\n\nconst propertyFilterAgentInfo: AgentFunctionInfo = {\n name: \"propertyFilterAgent\",\n agent: propertyFilterAgent,\n mock: propertyFilterAgent,\n inputs: {\n type: \"object\",\n },\n output: {\n type: \"any\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to apply filter\",\n },\n item: {\n type: \"object\",\n description: \"the object to apply filter\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [testInputs.array[0][0]] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: testInputs,\n params: { include: [\"color\", \"model\"] },\n result: [\n { color: \"red\", model: \"Model 3\" },\n { color: \"blue\", model: \"Model Y\" },\n ],\n },\n {\n inputs: testInputs,\n params: { exclude: [\"color\", \"model\"] },\n result: [\n { type: \"EV\", maker: \"Tesla\", range: 300 },\n { type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { exclude: [\"color\", \"model\"] },\n result: { type: \"EV\", maker: \"Tesla\", range: 300 },\n },\n {\n inputs: testInputs,\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: [\n {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n {\n color: \"red\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { swap: { maker: \"model\" } },\n result: [\n {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model Y\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { swap: { maker: \"model\" } },\n result: {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1, index: 0 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: {\n inspect: [\n { propId: \"isTesla\", equal: \"Tesla Motors\" }, // from: 1 is implied\n { propId: \"isGM\", notEqual: \"Tesla Motors\", from: 1 },\n ],\n },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n isTesla: true,\n isGM: false,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n isTesla: true,\n isGM: false,\n },\n ],\n },\n ],\n description: \"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default propertyFilterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copyAgent: AgentFunction<{\n namedKey?: string;\n}> = async ({ namedInputs, params }) => {\n const { namedKey } = params;\n assert(isNamedInputs(namedInputs), \"copyAgent: namedInputs is UNDEFINED!\");\n if (namedKey) {\n return namedInputs[namedKey];\n }\n return namedInputs;\n};\n\nconst copyAgentInfo: AgentFunctionInfo = {\n name: \"copyAgent\",\n agent: copyAgent,\n mock: copyAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n samples: [\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: {},\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { array: [\"Hello World\", \"Discarded\"] },\n params: {},\n result: { array: [\"Hello World\", \"Discarded\"] },\n },\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: { namedKey: \"color\" },\n result: \"red\",\n },\n ],\n description: \"Returns namedInputs\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default copyAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const vanillaFetchAgent: AgentFunction<{ debug?: boolean; type?: string; throwError?: boolean }, any, any> = async ({ namedInputs, params }) => {\n const { url, method, queryParams, headers, body } = namedInputs;\n const throwError = params.throwError ?? false;\n\n const url0 = new URL(url);\n const headers0 = headers ? { ...headers } : {};\n\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n url0.search = params.toString();\n }\n\n if (body) {\n headers0[\"Content-Type\"] = \"application/json\";\n }\n\n const fetchOptions: RequestInit = {\n method: (method ?? body) ? \"POST\" : \"GET\",\n headers: new Headers(headers0),\n body: body ? JSON.stringify(body) : undefined,\n };\n\n if (params?.debug) {\n return {\n url: url0.toString(),\n method: fetchOptions.method,\n headers: headers0,\n body: fetchOptions.body,\n };\n }\n\n const response = await fetch(url0.toString(), fetchOptions);\n\n if (!response.ok) {\n const status = response.status;\n const type = params?.type ?? \"json\";\n const error = type === \"json\" ? await response.json() : await response.text();\n if (throwError) {\n throw new Error(`HTTP error: ${status}`);\n }\n return {\n onError: {\n message: `HTTP error: ${status}`,\n status,\n error,\n },\n };\n }\n\n const result = await (async () => {\n const type = params?.type ?? \"json\";\n if (type === \"json\") {\n return await response.json();\n } else if (type === \"text\") {\n return response.text();\n }\n throw new Error(`Unknown Type! ${type}`);\n })();\n\n return result;\n};\n\nconst vanillaFetchAgentInfo: AgentFunctionInfo = {\n name: \"vanillaFetchAgent\",\n agent: vanillaFetchAgent,\n mock: vanillaFetchAgent,\n inputs: {\n type: \"object\",\n properties: {\n url: {\n type: \"string\",\n description: \"baseurl\",\n },\n method: {\n type: \"string\",\n description: \"HTTP method\",\n },\n headers: {\n type: \"object\",\n description: \"HTTP headers\",\n },\n quaryParams: {\n type: \"object\",\n description: \"Query parameters\",\n },\n body: {\n anyOf: [{ type: \"string\" }, { type: \"object\" }],\n description: \"body\",\n },\n },\n required: [\"url\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: { url: \"https://www.google.com\", queryParams: { foo: \"bar\" }, headers: { \"x-myHeader\": \"secret\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"GET\",\n url: \"https://www.google.com/?foo=bar\",\n headers: {\n \"x-myHeader\": \"secret\",\n },\n body: undefined,\n },\n },\n {\n inputs: { url: \"https://www.google.com\", body: { foo: \"bar\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"POST\",\n url: \"https://www.google.com/\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ foo: \"bar\" }),\n },\n },\n ],\n description: \"Retrieves JSON data from the specified URL\",\n category: [\"service\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default vanillaFetchAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const sleeperAgent: AgentFunction<{ duration?: number }> = async ({ params, namedInputs }) => {\n await sleep(params?.duration ?? 10);\n return namedInputs;\n};\n\nconst sleeperAgentInfo: AgentFunctionInfo = {\n name: \"sleeperAgent\",\n agent: sleeperAgent,\n mock: sleeperAgent,\n samples: [\n {\n inputs: {},\n params: { duration: 1 },\n result: {},\n },\n {\n inputs: { array: [{ a: 1 }, { b: 2 }] },\n params: { duration: 1 },\n result: {\n array: [{ a: 1 }, { b: 2 }],\n },\n },\n ],\n description: \"sleeper Agent\",\n category: [\"sleeper\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sleeperAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\ntype CompareDataItem = string | number | boolean | CompareData;\ntype CompareData = CompareDataItem[];\n\nconst compare = (_array: CompareData): boolean => {\n if (_array.length !== 3) {\n throw new Error(`compare inputs length must must be 3`);\n }\n const array = _array.map((value) => {\n if (Array.isArray(value)) {\n return compare(value);\n }\n return value;\n });\n const [a, operator, b] = array;\n if (operator === \"==\") {\n return a === b;\n }\n if (operator === \"!=\") {\n return a !== b;\n }\n if (operator === \">\") {\n return Number(a) > Number(b);\n }\n if (operator === \">=\") {\n return Number(a) >= Number(b);\n }\n if (operator === \"<\") {\n return Number(a) < Number(b);\n }\n if (operator === \"<=\") {\n return Number(a) <= Number(b);\n }\n if (operator === \"||\") {\n return !!a || !!b;\n }\n if (operator === \"&&\") {\n return !!a && !!b;\n }\n if (operator === \"XOR\") {\n return !!a === !b;\n }\n throw new Error(`unknown compare operator`);\n};\n\nexport const compareAgent: AgentFunction = async ({ namedInputs, params }) => {\n const ret = compare(namedInputs.array);\n if (params?.value) {\n return params?.value[ret ? \"true\" : \"false\"] ?? ret;\n }\n return ret;\n};\n\nconst compareAgentInfo: AgentFunctionInfo = {\n name: \"compareAgent\",\n agent: compareAgent,\n mock: compareAgent,\n inputs: {},\n output: {},\n samples: [\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"a\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abca\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"b\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abcd\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abc\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abcd\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"15\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">\", 15] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \">=\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 10\n inputs: { array: [\"10\", \">=\", \"19\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">=\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 19] },\n params: {},\n result: false,\n },\n //\n\n {\n inputs: { array: [\"10\", \"<\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<\", \"15\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<\", 15] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 20\n inputs: { array: [\"10\", \"<=\", \"19\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 19] },\n params: {},\n result: true,\n },\n\n {\n inputs: { array: [true, \"||\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"||\", false] },\n params: {},\n result: false,\n },\n\n {\n inputs: { array: [true, \"&&\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"&&\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [true, \"XOR\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"XOR\", true] },\n params: {},\n result: false,\n },\n //\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"||\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [[[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"bbb\", \"==\", \"bbb\"]], \"||\", [\"aaa\", \"&&\", \"bbb\"]] },\n params: {},\n result: true,\n },\n ],\n description: \"compare\",\n category: [\"compare\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default compareAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\n// https://platform.openai.com/docs/guides/vision\nconst getImageUrl = (data: string, imageType: string, detail?: string) => {\n if (imageType === \"http\") {\n return {\n url: data,\n };\n }\n const dataUrl = `data:image/${imageType};base64,${data}`;\n return {\n url: dataUrl,\n detail: detail ?? \"auto\",\n };\n};\n\ntype Content = { type: string; image_url: { url: string; detail?: string } } | { type: string; text: string };\n\nexport const images2messageAgent: AgentFunction<\n {\n imageType: string;\n detail?: string;\n },\n {\n message: {\n role: \"user\";\n content: Content[];\n };\n },\n {\n array: string[];\n prompt?: string;\n }\n> = async ({ namedInputs, params }) => {\n const { imageType, detail } = params;\n const { array, prompt } = namedInputs;\n arrayValidate(\"images2messageAgent\", namedInputs);\n assert(!!imageType, \"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...\");\n\n const contents: Content[] = array.map((base64ImageData) => {\n const image_url = getImageUrl(base64ImageData, imageType, detail);\n return {\n type: \"image_url\",\n image_url,\n };\n });\n\n if (prompt) {\n contents.unshift({ type: \"text\", text: prompt });\n }\n\n return {\n message: {\n role: \"user\",\n content: contents,\n },\n };\n};\n\nconst images2messageAgentInfo: AgentFunctionInfo = {\n name: \"images2messageAgent\",\n agent: images2messageAgent,\n mock: images2messageAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of base64 image data\",\n },\n prompt: {\n type: \"string\",\n description: \"prompt message\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [\"abcabc\", \"122123\"] },\n params: { imageType: \"png\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"abcabc\", \"122123\"], prompt: \"hello\" },\n params: { imageType: \"jpg\", detail: \"high\" },\n result: {\n message: {\n content: [\n {\n type: \"text\",\n text: \"hello\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"http://example.com/1.jpg\", \"http://example.com/2.jpg\"] },\n params: { imageType: \"http\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n url: \"http://example.com/1.jpg\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n url: \"http://example.com/2.jpg\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n ],\n description: \"Returns the message data for llm include image\",\n category: [\"image\"],\n author: \"Receptron team\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default images2messageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\n// Type for OpenAI's Embedding API\ninterface EmbeddingResponse {\n object: string;\n model: string;\n usage: {\n prompt_tokens: number;\n total_tokens: number;\n };\n data: [\n {\n object: string;\n index: number;\n embedding: number[];\n },\n ];\n}\n\nconst defaultEmbeddingModel = \"text-embedding-3-small\";\nconst OpenAI_embedding_API = \"https://api.openai.com/v1/embeddings\";\n\n// This agent retrieves embedding vectors for an array of strings using OpenAI's API\n//\n// Parameters:\n// model: Specifies the model (default is \"text-embedding-3-small\")\n// NamedInputs:\n// array: Array\n// item: string,\n// Result:\n// contents: Array>\n//\nexport const stringEmbeddingsAgent: AgentFunction<\n {\n model?: string;\n },\n number[][],\n { array: Array; item: string }\n> = async ({ params, namedInputs }) => {\n const { array, item } = namedInputs;\n\n const sources = array ?? [item];\n const apiKey = process.env.OPENAI_API_KEY;\n if (!apiKey) {\n throw new Error(\"OPENAI_API_KEY key is not set in environment variables.\");\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${apiKey}`,\n };\n\n const response = await fetch(OpenAI_embedding_API, {\n method: \"POST\",\n headers: headers,\n body: JSON.stringify({\n input: sources,\n model: params?.model ?? defaultEmbeddingModel,\n }),\n });\n const jsonResponse: EmbeddingResponse = await response.json();\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const embeddings = jsonResponse.data.map((object) => {\n return object.embedding;\n });\n return embeddings;\n};\n\nconst stringEmbeddingsAgentInfo: AgentFunctionInfo = {\n name: \"stringEmbeddingsAgent\",\n agent: stringEmbeddingsAgent,\n mock: stringEmbeddingsAgent,\n samples: [],\n description: \"Embeddings Agent\",\n category: [\"embedding\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringEmbeddingsAgentInfo;\n"],"names":["arrayValidate","isNamedInputs"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,IAAI;AAEtB,MAAM,mBAAmB,GAc5B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAI;AACpC,IAAA,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,gDAAgD,CAAC;AACvE,IAA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B;IAC/B,QAAQ,EAAE,CAAC,WAAW,CAAC;AACvB,IAAA,MAAM,EAAE,gBAAgB;AACxB,IAAA,UAAU,EAAE,sCAAsC;AAClD,IAAA,OAAO,EAAE,KAAK;;;;;"} \ No newline at end of file diff --git a/agents/vanilla_agents/lib/bundle.esm.min.js b/agents/vanilla_agents/lib/bundle.esm.min.js index a8b99593..062a5b7a 100644 --- a/agents/vanilla_agents/lib/bundle.esm.min.js +++ b/agents/vanilla_agents/lib/bundle.esm.min.js @@ -1,2 +1,2 @@ -import{assert as e,isObject as a,sleep as t,graphDataLatestVersion as r,GraphAI as s}from"graphai";import{arrayValidate as n,isNamedInputs as o}from"@graphai/agent_utils";const p=async({params:a,namedInputs:t})=>{e(!!t,"stringSplitterAgent: namedInputs is UNDEFINED!");const r=t.text,s=a.chunkSize??2048,n=a.overlap??Math.floor(s/8),o=Math.floor(r.length/(s-n))+1;return{contents:new Array(o).fill(void 0).map(((e,a)=>{const t=a*(s-n);return r.substring(t,t+s)})),count:o,chunkSize:s,overlap:n}},i={name:"stringSplitterAgent",agent:p,mock:p,inputs:{type:"object",properties:{text:{type:"string",description:"text to be chuncked"}},required:["text"]},output:{type:"object",properties:{contents:{type:"array",description:"the array of text chunks"},count:{type:"number",description:"the number of chunks"},chunkSize:{type:"number",description:"the chunk size"},overlap:{type:"number",description:"the overlap size"}}},samples:[{inputs:{text:"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do."},params:{chunkSize:64},result:{contents:["Here's to the crazy ones, the misfits, the rebels, the troublema","roublemakers, the round pegs in the square holes ... the ones wh"," ones who see things differently -- they're not fond of rules, a","rules, and they have no respect for the status quo. ... You can ","You can quote them, disagree with them, glorify or vilify them, ","y them, but the only thing you can't do is ignore them because t","ecause they change things. ... They push the human race forward,","forward, and while some may see them as the crazy ones, we see g","we see genius, because the people who are crazy enough to think ","o think that they can change the world, are the ones who do."," do."],count:11,chunkSize:64,overlap:8}}],description:"This agent strip one long string into chunks using following parameters",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},m=(e,t,r)=>"string"==typeof e?e===t?r:e.replace(t,r):Array.isArray(e)?e.map((e=>m(e,t,r))):a(e)?Object.keys(e).reduce(((a,s)=>(a[s]=m(e[s],t,r),a)),{}):e,l=async({params:e,namedInputs:a})=>{if(void 0===e.template){if(a.text)return a.text;console.warn("warning: stringTemplateAgent no template")}return Object.keys(a).reduce(((e,t)=>m(e,"${"+t+"}",a[t])),e.template)},u={message1:"hello",message2:"test"},c={name:"stringTemplateAgent",agent:l,mock:l,samples:[{inputs:u,params:{template:"${message1}: ${message2}"},result:"hello: test"},{inputs:u,params:{template:["${message1}: ${message2}","${message2}: ${message1}"]},result:["hello: test","test: hello"]},{inputs:u,params:{template:{apple:"${message1}",lemon:"${message2}"}},result:{apple:"hello",lemon:"test"}},{inputs:u,params:{template:[{apple:"${message1}",lemon:"${message2}"}]},result:[{apple:"hello",lemon:"test"}]},{inputs:u,params:{template:{apple:"${message1}",lemon:["${message2}"]}},result:{apple:"hello",lemon:["test"]}},{inputs:{agent:"openAiAgent",row:"hello world",params:{text:"message"}},params:{template:{version:.5,nodes:{ai:{agent:"${agent}",isResult:!0,params:"${params}",inputs:{prompt:"${row}"}}}}},result:{nodes:{ai:{agent:"openAiAgent",inputs:{prompt:"hello world"},isResult:!0,params:{text:"message"}}},version:.5}}],description:"Template agent",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},g=async({namedInputs:e})=>{const{text:a,data:t}=e;if(t)return JSON.stringify(t,null,2);const r=("\n"+a).match(/\n```[a-zA-z]*([\s\S]*?)\n```/);return r?JSON.parse(r[1]):JSON.parse(a)},y={apple:"red",lemon:"yellow"},d=JSON.stringify(y),h=["```",d,"```"].join("\n"),b=["```json",d,"```"].join("\n"),f=["```JSON",d,"```"].join("\n"),w={name:"jsonParserAgent",agent:g,mock:g,inputs:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},output:{type:"string"},samples:[{inputs:{data:y},params:{},result:JSON.stringify(y,null,2)},{inputs:{text:JSON.stringify(y,null,2)},params:{},result:y},{inputs:{text:h},params:{},result:y},{inputs:{text:b},params:{},result:y},{inputs:{text:f},params:{},result:y}],description:"Template agent",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},A=async({namedInputs:e,params:a})=>{const{suffix:t}=a,r=e.text.trim().replace(/[\s-_]+/g," ").toLowerCase().split(" ");t&&r[r.length-1]!==t&&r.push(t);const s=r.join(" ");return{lowerCamelCase:r.map(((e,a)=>0===a?e:e.charAt(0).toUpperCase()+e.slice(1))).join(""),snakeCase:s.replace(/\s+/g,"_"),kebabCase:s.replace(/\s+/g,"-"),normalized:s}},I={name:"stringCaseVariantsAgent",agent:A,mock:A,samples:[{inputs:{text:"this is a pen"},params:{},result:{kebabCase:"this-is-a-pen",lowerCamelCase:"thisIsAPen",normalized:"this is a pen",snakeCase:"this_is_a_pen"}},{inputs:{text:"string case variants"},params:{suffix:"agent"},result:{kebabCase:"string-case-variants-agent",lowerCamelCase:"stringCaseVariantsAgent",normalized:"string case variants agent",snakeCase:"string_case_variants_agent"}}],description:"Format String Cases agent",category:["string"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},k=async({namedInputs:a})=>{const t=" Set inputs: { array: :arrayNodeId, item: :itemNodeId }";n("pushAgent",a,t);const{item:r,items:s}=a;e(!(!r&&!s),"pushAgent: namedInputs.item is UNDEFINED!"+t);const o=a.array.map((e=>e));return r?o.push(r):s.forEach((e=>{o.push(e)})),{array:o}},T={name:"pushAgent",agent:k,mock:k,inputs:{type:"object",properties:{array:{type:"array",description:"the array to push an item to"},item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item push into the array"},items:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item push into the array"}},required:["array"]},output:{type:"object",properties:{array:{type:"array"}}},samples:[{inputs:{array:[1,2],item:3},params:{},result:{array:[1,2,3]}},{inputs:{array:[{apple:1}],item:{lemon:2}},params:{},result:{array:[{apple:1},{lemon:2}]}},{inputs:{array:[{apple:1}],items:[{lemon:2},{banana:3}]},params:{},result:{array:[{apple:1},{lemon:2},{banana:3}]}}],description:"push Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},v=async({namedInputs:e})=>{n("popAgent",e);const a=e.array.map((e=>e)),t=a.pop();return{array:a,item:t}},j={name:"popAgent",agent:v,mock:v,inputs:{type:"object",properties:{array:{type:"array",description:"the array to pop an item from"}},required:["array"]},output:{type:"object",properties:{item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item popped from the array"},array:{type:"array",description:"the remaining array"}}},samples:[{inputs:{array:[1,2,3]},params:{},result:{array:[1,2],item:3}},{inputs:{array:["a","b","c"]},params:{},result:{array:["a","b"],item:"c"}},{inputs:{array:[1,2,3],array2:["a","b","c"]},params:{},result:{array:[1,2],item:3}}],description:"Pop Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},E=async({namedInputs:e})=>{n("shiftAgent",e);const a=e.array.map((e=>e)),t=a.shift();return{array:a,item:t}},x={name:"shiftAgent",agent:E,mock:E,inputs:{type:"object",properties:{array:{type:"array",description:"the array to shift an item from"}},required:["array"]},output:{type:"object",properties:{item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item shifted from the array"},array:{type:"array",description:"the remaining array"}}},samples:[{inputs:{array:[1,2,3]},params:{},result:{array:[2,3],item:1}},{inputs:{array:["a","b","c"]},params:{},result:{array:["b","c"],item:"a"}}],description:"shift Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},M=async({namedInputs:e,params:a})=>{n("arrayFlatAgent",e);const t=a.depth??1;return{array:e.array.map((e=>e)).flat(t)}},N={name:"arrayFlatAgent",agent:M,mock:M,inputs:{type:"object",properties:{array:{type:"array",description:"flat array"}},required:["array"]},output:{type:"object",properties:{array:{type:"array",description:"the remaining array"}}},params:{type:"object",properties:{depth:{type:"number",description:"array depth"}}},samples:[{inputs:{array:[[1],[2],[3]]},params:{},result:{array:[1,2,3]}},{inputs:{array:[[1],[2],[[3]]]},params:{},result:{array:[1,2,[3]]}},{inputs:{array:[[1],[2],[[3]]]},params:{depth:2},result:{array:[1,2,3]}},{inputs:{array:[["a"],["b"],["c"]]},params:{},result:{array:["a","b","c"]}}],description:"Array Flat Agent",category:["array"],author:"Receptron team",repository:"https://github.com/receptron/graphai",cacheType:"pureAgent",license:"MIT"},_=async({namedInputs:e,params:a})=>{n("arrayJoinAgent",e);const t=a.separator??"",{flat:r}=a;return{text:r?e.array.flat(r).join(t):e.array.join(t)}},R={name:"arrayJoinAgent",agent:_,mock:_,inputs:{type:"object",properties:{array:{type:"array",description:"array join"}},required:["array"]},params:{type:"object",properties:{separator:{type:"string",description:"array join separator"},flat:{type:"number",description:"array flat depth"}}},output:{type:"object",properties:{text:{type:"string",description:"joined text"}}},samples:[{inputs:{array:[[1],[2],[3]]},params:{},result:{text:"123"}},{inputs:{array:[[1],[2],[[3]]]},params:{},result:{text:"123"}},{inputs:{array:[["a"],["b"],["c"]]},params:{},result:{text:"abc"}},{inputs:{array:[[1],[2],[3]]},params:{separator:"|"},result:{text:"1|2|3"}},{inputs:{array:[[[1]],[[2],[3]]]},params:{separator:"|"},result:{text:"1|2,3"}},{inputs:{array:[[[1]],[[2],[3]]]},params:{separator:"|",flat:1},result:{text:"1|2|3"}},{inputs:{array:[[[[1]],[[2],[3]]]]},params:{separator:"|",flat:1},result:{text:"1|2,3"}},{inputs:{array:[[[[1]],[[2],[3]]]]},params:{separator:"|",flat:2},result:{text:"1|2|3"}}],description:"Array Join Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},S=async({namedInputs:a})=>{e(!!a,"dotProductAgent: namedInputs is UNDEFINED!");const t=a.matrix,r=a.vector;if(t[0].length!=r.length)throw new Error(`dotProduct: Length of vectors do not match. ${t[0].length}, ${r.length}`);return t.map((e=>e.reduce(((e,a,t)=>e+a*r[t]),0)))},O={name:"dotProductAgent",agent:S,mock:S,inputs:{type:"object",properties:{matrix:{type:"array",description:"two dimentional matrix",items:{type:"array",items:{type:"number"}}},vector:{type:"array",description:"the vector",items:{type:"number"}}},required:["matrix","vector"]},output:{type:"array"},samples:[{inputs:{matrix:[[1,2],[3,4],[5,6]],vector:[3,2]},params:{},result:[7,17,27]},{inputs:{matrix:[[1,2],[2,3]],vector:[1,2]},params:{},result:[5,8]}],description:"dotProduct Agent",category:["matrix"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},P=async({params:a,namedInputs:t})=>{e(!!t,"sortByValue: namedInputs is UNDEFINED!"),e(!!t.array,"sortByValue: namedInputs.array is UNDEFINED!"),e(!!t.values,"sortByValue: namedInputs.values is UNDEFINED!");const r=a?.assendant?-1:1,s=t.array,n=t.values;return s.map(((e,a)=>({item:e,value:n[a]}))).sort(((e,a)=>(a.value-e.value)*r)).map((e=>e.item))},$={name:"sortByValuesAgent",agent:P,mock:P,inputs:{type:"object",properties:{array:{type:"array",description:"the array to sort"},values:{type:"array",description:"values associated with items in the array"}},required:["array","values"]},output:{type:"array"},samples:[{inputs:{array:["banana","orange","lemon","apple"],values:[2,5,6,4]},params:{},result:["lemon","orange","apple","banana"]},{inputs:{array:["banana","orange","lemon","apple"],values:[2,5,6,4]},params:{assendant:!0},result:["banana","apple","orange","lemon"]}],description:"sortByValues Agent",category:["matrix"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},C=async({params:e,filterParams:a})=>e.filterParams?a:e,D={name:"echoAgent",agent:C,mock:C,samples:[{inputs:{},params:{text:"this is test"},result:{text:"this is test"}},{inputs:{},params:{text:"If you add filterParams option, it will respond to filterParams",filterParams:!0},result:{}}],description:"Echo agent",category:["test"],cacheType:"pureAgent",author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},q=async({params:e})=>({list:new Array(e.count).fill(void 0).map(((e,a)=>a))}),V={name:"countingAgent",agent:q,mock:q,samples:[{inputs:{},params:{count:4},result:{list:[0,1,2,3]}}],description:"Counting agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},F=async({params:e})=>({messages:new Array(e.count).fill(void 0).map((()=>e.message))}),z={name:"copyMessageAgent",agent:F,mock:F,samples:[{inputs:{},params:{count:4,message:"hello"},result:{messages:["hello","hello","hello","hello"]}}],description:"CopyMessage agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},U=async({namedInputs:a,params:t})=>{e(o(a),"copy2ArrayAgent: namedInputs is UNDEFINED!");const r=a.item?a.item:a;return new Array(t.count).fill(void 0).map((()=>r))},J={name:"copy2ArrayAgent",agent:U,mock:U,samples:[{inputs:{item:{message:"hello"}},params:{count:10},result:[{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"}]},{inputs:{message:"hello"},params:{count:10},result:[{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"}]},{inputs:{item:"hello"},params:{count:10},result:["hello","hello","hello","hello","hello","hello","hello","hello","hello","hello"]}],description:"Copy2Array agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},Y=async({debugInfo:{nodeId:e},namedInputs:a})=>{n("mergeNodeIdAgent",a);return a.array.reduce(((e,a)=>({...e,...a})),{[e]:"hello"})},K={name:"mergeNodeIdAgent",agent:Y,mock:Y,samples:[{inputs:{array:[{message:"hello"}]},params:{},result:{message:"hello",test:"hello"}}],description:"merge node id agent",category:["test"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},H=async({params:e,filterParams:a,namedInputs:r})=>{const s=e.message??r.message??"";for await(const r of s.split(""))a.streamTokenCallback&&a.streamTokenCallback(r),await t(e.sleep||100);return{message:s}},L={name:"streamMockAgent",agent:H,mock:H,inputs:{anyOf:[{type:"object",properties:{message:{type:"string",description:"streaming message"}}},{type:"array"}]},samples:[{inputs:{},params:{message:"this is params test"},result:{message:"this is params test"}},{inputs:{message:"this is named inputs test"},params:{},result:{message:"this is named inputs test"}}],description:"Stream mock agent",category:["test"],author:"Isamu Arimoto",repository:"https://github.com/receptron/graphai",license:"MIT",stream:!0},G=async a=>{const{forNestedGraph:t}=a,{graphData:n}=t??{graphData:{nodes:{}}};return e(!!n,"No GraphData"),await(a=>async t=>{const{namedInputs:n,log:o,debugInfo:p,params:i,forNestedGraph:m}=t;e(!!m,"Please update graphai to 0.5.19 or higher");const{agents:l,graphOptions:u,onLogCallback:c}=m,{taskManager:g}=u,y=i.throwError??!1;if(g){const a=g.getStatus(!1);e(a.concurrency>a.running,`nestedAgent: Concurrency is too low: ${a.concurrency}`)}e(!!a,"nestedAgent: graph is required");const{nodes:d}=a,h={...a,nodes:{...d},version:r},b=Object.keys(n);b.length>0&&b.forEach((e=>{void 0===h.nodes[e]?h.nodes[e]={value:n[e]}:h.nodes[e].value=n[e]}));try{void 0===h.version&&p.version&&(h.version=p.version);const e=new s(h,l||{},u);c&&(e.onLogCallback=c);const a=await e.run(!1);return o?.push(...e.transactionLogs()),a}catch(e){if(e instanceof Error&&!y)return{onError:{message:e.message,error:e}};throw e}})(n)(a)},B={name:"nestedAgent",agent:G,mock:G,samples:[{inputs:{message:"hello"},params:{},result:{test:["hello"]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"messages"},inputs:{messages:[":message"]},isResult:!0}}}}],description:"nested Agent",category:["graph"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},X=async({params:a,namedInputs:t,log:n,debugInfo:o,forNestedGraph:p})=>{e(!!p,"Please update graphai to 0.5.19 or higher");const{agents:i,graphData:m,graphOptions:l,onLogCallback:u}=p,{taskManager:c}=l;if(c){const a=c.getStatus();e(a.concurrency>a.running,`mapAgent: Concurrency is too low: ${a.concurrency}`)}e(!!t.rows,"mapAgent: rows property is required in namedInput"),e(!!m,"mapAgent: graph is required");const g=t.rows.map((e=>e));a.limit&&a.limit{const a="rows"===e?"row":e;void 0===b.nodes[a]?b.nodes[a]={value:t[e]}:"agent"in b.nodes[a]||(b.nodes[a].value=t[e])}));try{void 0===b.version&&o.version&&(b.version=o.version);const e=g.map(((e,a)=>{const t=new s(b,i||{},l);return t.injectValue("row",e,"__mapAgent_inputs__"),t.injectValue("__mapIndex",a,"__mapAgent_inputs__"),u&&(t.onLogCallback=u),t})),t=e.map((e=>e.run(y))),r=await Promise.all(t),p=Object.keys(r[0]);if(n){const a=e.map(((e,a)=>e.transactionLogs().map((e=>(e.mapIndex=a,e)))));n.push(...a.flat())}if(a.compositeResult){return p.reduce(((e,a)=>(e[a]=r.map((e=>e[a])),e)),{})}return r}catch(e){if(e instanceof Error&&!d)return{onError:{message:e.message,error:e}};throw e}},W={name:"mapAgent",agent:X,mock:X,samples:[{inputs:{rows:[1,2]},params:{},result:[{test:[1]},{test:[2]}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]},isResult:!0}}}},{inputs:{rows:["apple","orange","banana","lemon","melon","pineapple","tomato"]},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${word}."},inputs:{word:":row"},isResult:!0}}},result:[{node2:"I love apple."},{node2:"I love orange."},{node2:"I love banana."},{node2:"I love lemon."},{node2:"I love melon."},{node2:"I love pineapple."},{node2:"I love tomato."}]},{inputs:{rows:[{fruit:"apple"},{fruit:"orange"}]},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${item}."},inputs:{item:":row.fruit"},isResult:!0}}},result:[{node2:"I love apple."},{node2:"I love orange."}]},{inputs:{rows:[{fruit:"apple"},{fruit:"orange"}],name:"You",verb:"like"},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"${name} ${verb} ${fruit}."},inputs:{fruit:":row.fruit",name:":name",verb:":verb"},isResult:!0}}},result:[{node2:"You like apple."},{node2:"You like orange."}]},{inputs:{rows:[1,2]},params:{resultAll:!0},result:[{__mapIndex:0,test:[1],row:1},{__mapIndex:1,test:[2],row:2}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}},{inputs:{rows:[1,2]},params:{resultAll:!0},result:[{__mapIndex:0,map:[{test:1},{test:1}],row:1,test:1},{__mapIndex:1,map:[{test:2},{test:2}],test:2,row:2}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"row"},inputs:{row:":row"}},map:{agent:"mapAgent",inputs:{rows:[":test",":test"]},graph:{nodes:{test:{isResult:!0,agent:"copyAgent",params:{namedKey:"row"},inputs:{row:":row"}}}}}}}},{inputs:{rows:[1,2]},params:{compositeResult:!0},result:{test:[[1],[2]]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]},isResult:!0}}}},{inputs:{rows:["apple","orange","banana","lemon","melon","pineapple","tomato"]},params:{compositeResult:!0},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${row}."},inputs:{row:":row"},isResult:!0}}},result:{node2:["I love apple.","I love orange.","I love banana.","I love lemon.","I love melon.","I love pineapple.","I love tomato."]}},{inputs:{rows:[1,2]},params:{resultAll:!0,compositeResult:!0},result:{test:[[1],[2]],__mapIndex:[0,1],row:[1,2]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}},{inputs:{rows:[1,2]},params:{resultAll:!0,compositeResult:!0},result:{__mapIndex:[0,1],test:[[1],[2]],map:[{test:[[[1]],[[1]]]},{test:[[[2]],[[2]]]}],row:[1,2]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}},map:{agent:"mapAgent",inputs:{rows:[":test",":test"]},params:{compositeResult:!0},graph:{nodes:{test:{isResult:!0,agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}}}}}],description:"Map Agent",category:["graph"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},Q=async({namedInputs:a})=>(e(o(a),"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }"),e(!!a?.array,"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }"),a.array.reduce(((e,a)=>((Array.isArray(a)?a:[a]).forEach((a=>{Object.keys(a).forEach((t=>{const r=a[t];e[t]?e[t]+=r:e[t]=r}))})),e)),{})),Z={name:"totalAgent",agent:Q,mock:Q,inputs:{type:"object",properties:{array:{type:"array",description:"the array"}},required:["array"]},output:{type:"object"},samples:[{inputs:{array:[{a:1},{a:2},{a:3}]},params:{},result:{a:6}},{inputs:{array:[[{a:1,b:-1},{c:10}],[{a:2,b:-1}],[{a:3,b:-2},{d:-10}]]},params:{},result:{a:6,b:-4,c:10,d:-10}},{inputs:{array:[{a:1}]},params:{},result:{a:1}},{inputs:{array:[{a:1},{a:2}]},params:{},result:{a:3}},{inputs:{array:[{a:1},{a:2},{a:3}]},params:{},result:{a:6}},{inputs:{array:[{a:1,b:1},{a:2,b:2},{a:3,b:0}]},params:{},result:{a:6,b:3}},{inputs:{array:[{a:1},{a:2,b:2},{a:3,b:0}]},params:{},result:{a:6,b:2}}],description:"Returns the sum of input values",category:["data"],author:"Satoshi Nakajima",repository:"https://github.com/snakajima/graphai",license:"MIT"},ee=async({namedInputs:a})=>(e(o(a),"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }"),e(!!a?.array,"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }"),a.array.reduce(((e,a)=>e+a),0)),ae={name:"dataSumTemplateAgent",agent:ee,mock:ee,inputs:{type:"object",properties:{array:{type:"array",description:"the array of numbers to calculate the sum of",items:{type:"integer"}}},required:["array"]},output:{type:"number"},samples:[{inputs:{array:[1]},params:{},result:1},{inputs:{array:[1,2]},params:{},result:3},{inputs:{array:[1,2,3]},params:{},result:6}],description:"Returns the sum of input values",category:["data"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},te=(e,a,t,r,s,n,o,p,i)=>{const m=r||Object.keys(e),l=new Set(s??[]),u=m.reduce(((a,t)=>{if(!l.has(t)){const r=n&&n[t];r&&r[e[t]]?a[t]=r[e[t]]:a[t]=e[t]}return a}),{});return o&&o.forEach((e=>{void 0!==e.index&&e.index!==a||(u[e.propId]=t[e.from])})),i&&i.forEach((e=>{const a=t[e.from??1];e.equal?u[e.propId]=e.equal===a:e.notEqual&&(u[e.propId]=e.notEqual!==a)})),p&&Object.keys(p).forEach((e=>{const a=u[e];u[e]=u[p[e]],u[p[e]]=a})),u},re=async({namedInputs:e,params:a})=>{const{include:t,exclude:r,alter:s,inject:n,swap:o,inspect:p}=a,{array:i,item:m}=e;if(i){const[e]=i;return Array.isArray(e)?e.map(((e,a)=>te(e,a,i,t,r,s,n,o,p))):te(e,0,i,t,r,s,n,o,p)}return!!m&&te(m,0,[],t,r,s,n,o,p)},se={array:[[{color:"red",model:"Model 3",type:"EV",maker:"Tesla",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400}],"Tesla Motors"]},ne={name:"propertyFilterAgent",agent:re,mock:re,inputs:{type:"object"},output:{type:"any",properties:{array:{type:"array",description:"the array to apply filter"},item:{type:"object",description:"the object to apply filter"}}},samples:[{inputs:{array:[se.array[0][0]]},params:{include:["color","model"]},result:{color:"red",model:"Model 3"}},{inputs:{item:se.array[0][0]},params:{include:["color","model"]},result:{color:"red",model:"Model 3"}},{inputs:se,params:{include:["color","model"]},result:[{color:"red",model:"Model 3"},{color:"blue",model:"Model Y"}]},{inputs:se,params:{exclude:["color","model"]},result:[{type:"EV",maker:"Tesla",range:300},{type:"EV",maker:"Tesla",range:400}]},{inputs:{item:se.array[0][0]},params:{exclude:["color","model"]},result:{type:"EV",maker:"Tesla",range:300}},{inputs:se,params:{alter:{color:{red:"blue",blue:"red"}}},result:[{color:"blue",model:"Model 3",type:"EV",maker:"Tesla",range:300},{color:"red",model:"Model Y",type:"EV",maker:"Tesla",range:400}]},{inputs:{item:se.array[0][0]},params:{alter:{color:{red:"blue",blue:"red"}}},result:{color:"blue",model:"Model 3",type:"EV",maker:"Tesla",range:300}},{inputs:se,params:{swap:{maker:"model"}},result:[{color:"red",model:"Tesla",type:"EV",maker:"Model 3",range:300},{color:"blue",model:"Tesla",type:"EV",maker:"Model Y",range:400}]},{inputs:{item:se.array[0][0]},params:{swap:{maker:"model"}},result:{color:"red",model:"Tesla",type:"EV",maker:"Model 3",range:300}},{inputs:se,params:{inject:[{propId:"maker",from:1}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla Motors",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla Motors",range:400}]},{inputs:se,params:{inject:[{propId:"maker",from:1,index:0}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla Motors",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400}]},{inputs:se,params:{inspect:[{propId:"isTesla",equal:"Tesla Motors"},{propId:"isGM",notEqual:"Tesla Motors",from:1}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla",range:300,isTesla:!0,isGM:!1},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400,isTesla:!0,isGM:!1}]}],description:"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'",category:["data"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},oe=async({namedInputs:a,params:t})=>{const{namedKey:r}=t;return e(o(a),"copyAgent: namedInputs is UNDEFINED!"),r?a[r]:a},pe={name:"copyAgent",agent:oe,mock:oe,inputs:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},output:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},samples:[{inputs:{color:"red",model:"Model 3"},params:{},result:{color:"red",model:"Model 3"}},{inputs:{array:["Hello World","Discarded"]},params:{},result:{array:["Hello World","Discarded"]}},{inputs:{color:"red",model:"Model 3"},params:{namedKey:"color"},result:"red"}],description:"Returns namedInputs",category:["data"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},ie=async({namedInputs:e,params:a})=>{const{url:t,method:r,queryParams:s,headers:n,body:o}=e,p=a.throwError??!1,i=new URL(t),m=n?{...n}:{};if(s){const e=new URLSearchParams(s);i.search=e.toString()}o&&(m["Content-Type"]="application/json");const l={method:r??o?"POST":"GET",headers:new Headers(m),body:o?JSON.stringify(o):void 0};if(a?.debug)return{url:i.toString(),method:l.method,headers:m,body:l.body};const u=await fetch(i.toString(),l);if(!u.ok){const e=u.status,t="json"===(a?.type??"json")?await u.json():await u.text();if(p)throw new Error(`HTTP error: ${e}`);return{onError:{message:`HTTP error: ${e}`,status:e,error:t}}}return await(async()=>{const e=a?.type??"json";if("json"===e)return await u.json();if("text"===e)return u.text();throw new Error(`Unknown Type! ${e}`)})()},me={name:"vanillaFetchAgent",agent:ie,mock:ie,inputs:{type:"object",properties:{url:{type:"string",description:"baseurl"},method:{type:"string",description:"HTTP method"},headers:{type:"object",description:"HTTP headers"},quaryParams:{type:"object",description:"Query parameters"},body:{anyOf:[{type:"string"},{type:"object"}],description:"body"}},required:["url"]},output:{type:"array"},samples:[{inputs:{url:"https://www.google.com",queryParams:{foo:"bar"},headers:{"x-myHeader":"secret"}},params:{debug:!0},result:{method:"GET",url:"https://www.google.com/?foo=bar",headers:{"x-myHeader":"secret"},body:void 0}},{inputs:{url:"https://www.google.com",body:{foo:"bar"}},params:{debug:!0},result:{method:"POST",url:"https://www.google.com/",headers:{"Content-Type":"application/json"},body:JSON.stringify({foo:"bar"})}}],description:"Retrieves JSON data from the specified URL",category:["service"],author:"Receptron",repository:"https://github.com/receptron/graphai",license:"MIT"},le=async({params:e,namedInputs:a})=>(await t(e?.duration??10),a),ue={name:"sleeperAgent",agent:le,mock:le,samples:[{inputs:{},params:{duration:1},result:{}},{inputs:{array:[{a:1},{b:2}]},params:{duration:1},result:{array:[{a:1},{b:2}]}}],description:"sleeper Agent",category:["sleeper"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},ce=e=>{if(3!==e.length)throw new Error("compare inputs length must must be 3");const a=e.map((e=>Array.isArray(e)?ce(e):e)),[t,r,s]=a;if("=="===r)return t===s;if("!="===r)return t!==s;if(">"===r)return Number(t)>Number(s);if(">="===r)return Number(t)>=Number(s);if("<"===r)return Number(t){const t=ce(e.array);return a?.value?a?.value[t?"true":"false"]??t:t},ye={name:"compareAgent",agent:ge,mock:ge,inputs:{},output:{},samples:[{inputs:{array:["abc","==","abc"]},params:{value:{true:"a",false:"b"}},result:"a"},{inputs:{array:["abc","==","abca"]},params:{value:{true:"a",false:"b"}},result:"b"},{inputs:{array:["abc","==","abc"]},params:{},result:!0},{inputs:{array:["abc","==","abcd"]},params:{},result:!1},{inputs:{array:["abc","!=","abc"]},params:{},result:!1},{inputs:{array:["abc","!=","abcd"]},params:{},result:!0},{inputs:{array:["10",">","5"]},params:{},result:!0},{inputs:{array:["10",">","15"]},params:{},result:!1},{inputs:{array:[10,">",5]},params:{},result:!0},{inputs:{array:[10,">",15]},params:{},result:!1},{inputs:{array:["10",">=","5"]},params:{},result:!0},{inputs:{array:["10",">=","10"]},params:{},result:!0},{inputs:{array:["10",">=","19"]},params:{},result:!1},{inputs:{array:[10,">=",5]},params:{},result:!0},{inputs:{array:[10,">=",10]},params:{},result:!0},{inputs:{array:[10,">=",19]},params:{},result:!1},{inputs:{array:["10","<","5"]},params:{},result:!1},{inputs:{array:["10","<","15"]},params:{},result:!0},{inputs:{array:[10,"<",5]},params:{},result:!1},{inputs:{array:[10,"<",15]},params:{},result:!0},{inputs:{array:["10","<=","5"]},params:{},result:!1},{inputs:{array:["10","<=","10"]},params:{},result:!0},{inputs:{array:["10","<=","19"]},params:{},result:!0},{inputs:{array:[10,"<=",5]},params:{},result:!1},{inputs:{array:[10,"<=",10]},params:{},result:!0},{inputs:{array:[10,"<=",19]},params:{},result:!0},{inputs:{array:[!0,"||",!1]},params:{},result:!0},{inputs:{array:[!1,"||",!1]},params:{},result:!1},{inputs:{array:[!0,"&&",!1]},params:{},result:!1},{inputs:{array:[!0,"&&",!0]},params:{},result:!0},{inputs:{array:[!0,"XOR",!1]},params:{},result:!0},{inputs:{array:[!1,"XOR",!0]},params:{},result:!0},{inputs:{array:[!1,"XOR",!1]},params:{},result:!1},{inputs:{array:[!0,"XOR",!0]},params:{},result:!1},{inputs:{array:[["aaa","==","aaa"],"||",["aaa","==","bbb"]]},params:{},result:!0},{inputs:{array:[["aaa","==","aaa"],"&&",["aaa","==","bbb"]]},params:{},result:!1},{inputs:{array:[[["aaa","==","aaa"],"&&",["bbb","==","bbb"]],"||",["aaa","&&","bbb"]]},params:{},result:!0}],description:"compare",category:["compare"],author:"Receptron",repository:"https://github.com/receptron/graphai",license:"MIT"},de=async({namedInputs:a,params:t})=>{const{imageType:r,detail:s}=t,{array:o,prompt:p}=a;n("images2messageAgent",a),e(!!r,"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...");const i=o.map((e=>{const a=((e,a,t)=>"http"===a?{url:e}:{url:`data:image/${a};base64,${e}`,detail:t??"auto"})(e,r,s);return{type:"image_url",image_url:a}}));return p&&i.unshift({type:"text",text:p}),{message:{role:"user",content:i}}},he={name:"images2messageAgent",agent:de,mock:de,inputs:{type:"object",properties:{array:{type:"array",description:"the array of base64 image data"},prompt:{type:"string",description:"prompt message"}},required:["array"]},output:{type:"object"},samples:[{inputs:{array:["abcabc","122123"]},params:{imageType:"png"},result:{message:{content:[{image_url:{detail:"auto",url:"data:image/png;base64,abcabc"},type:"image_url"},{image_url:{detail:"auto",url:"data:image/png;base64,122123"},type:"image_url"}],role:"user"}}},{inputs:{array:["abcabc","122123"],prompt:"hello"},params:{imageType:"jpg",detail:"high"},result:{message:{content:[{type:"text",text:"hello"},{image_url:{detail:"high",url:"data:image/jpg;base64,abcabc"},type:"image_url"},{image_url:{detail:"high",url:"data:image/jpg;base64,122123"},type:"image_url"}],role:"user"}}},{inputs:{array:["http://example.com/1.jpg","http://example.com/2.jpg"]},params:{imageType:"http"},result:{message:{content:[{image_url:{url:"http://example.com/1.jpg"},type:"image_url"},{image_url:{url:"http://example.com/2.jpg"},type:"image_url"}],role:"user"}}}],description:"Returns the message data for llm include image",category:["image"],author:"Receptron team",repository:"https://github.com/snakajima/graphai",license:"MIT"},be=async({params:e,namedInputs:a})=>{const{array:t,item:r}=a,s=t??[r],n=process.env.OPENAI_API_KEY;if(!n)throw new Error("OPENAI_API_KEY key is not set in environment variables.");const o={"Content-Type":"application/json",Authorization:`Bearer ${n}`},p=await fetch("https://api.openai.com/v1/embeddings",{method:"POST",headers:o,body:JSON.stringify({input:s,model:e?.model??"text-embedding-3-small"})}),i=await p.json();if(!p.ok)throw new Error(`HTTP error! status: ${p.status}`);return i.data.map((e=>e.embedding))},fe={name:"stringEmbeddingsAgent",agent:be,mock:be,samples:[],description:"Embeddings Agent",category:["embedding"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"};export{N as arrayFlatAgent,R as arrayJoinAgent,ye as compareAgent,J as copy2ArrayAgent,pe as copyAgent,z as copyMessageAgent,V as countingAgent,ae as dataSumTemplateAgent,O as dotProductAgent,D as echoAgent,he as images2messageAgent,w as jsonParserAgent,W as mapAgent,K as mergeNodeIdAgent,B as nestedAgent,j as popAgent,ne as propertyFilterAgent,T as pushAgent,x as shiftAgent,ue as sleeperAgent,$ as sortByValuesAgent,L as streamMockAgent,I as stringCaseVariantsAgent,fe as stringEmbeddingsAgent,i as stringSplitterAgent,c as stringTemplateAgent,Z as totalAgent,me as vanillaFetchAgent}; +import{assert as e,isObject as t,graphDataLatestVersion as a,GraphAI as r,sleep as s}from"graphai";import{arrayValidate as n,isNamedInputs as o}from"@graphai/agent_utils";const p=async({params:t,namedInputs:a})=>{e(!!a,"stringSplitterAgent: namedInputs is UNDEFINED!");const r=a.text,s=t.chunkSize??2048,n=t.overlap??Math.floor(s/8),o=Math.floor(r.length/(s-n))+1;return{contents:new Array(o).fill(void 0).map(((e,t)=>{const a=t*(s-n);return r.substring(a,a+s)})),count:o,chunkSize:s,overlap:n}},i={name:"stringSplitterAgent",agent:p,mock:p,inputs:{type:"object",properties:{text:{type:"string",description:"text to be chuncked"}},required:["text"]},output:{type:"object",properties:{contents:{type:"array",description:"the array of text chunks"},count:{type:"number",description:"the number of chunks"},chunkSize:{type:"number",description:"the chunk size"},overlap:{type:"number",description:"the overlap size"}}},samples:[{inputs:{text:"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do."},params:{chunkSize:64},result:{contents:["Here's to the crazy ones, the misfits, the rebels, the troublema","roublemakers, the round pegs in the square holes ... the ones wh"," ones who see things differently -- they're not fond of rules, a","rules, and they have no respect for the status quo. ... You can ","You can quote them, disagree with them, glorify or vilify them, ","y them, but the only thing you can't do is ignore them because t","ecause they change things. ... They push the human race forward,","forward, and while some may see them as the crazy ones, we see g","we see genius, because the people who are crazy enough to think ","o think that they can change the world, are the ones who do."," do."],count:11,chunkSize:64,overlap:8}}],description:"This agent strip one long string into chunks using following parameters",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},m=(e,a,r)=>"string"==typeof e?e===a?r:e.replace(a,r):Array.isArray(e)?e.map((e=>m(e,a,r))):t(e)?Object.keys(e).reduce(((t,s)=>(t[s]=m(e[s],a,r),t)),{}):e,l=async({params:e,namedInputs:t})=>{if(void 0===e.template){if(t.text)return t.text;console.warn("warning: stringTemplateAgent no template")}return Object.keys(t).reduce(((e,a)=>m(e,"${"+a+"}",t[a])),e.template)},u={message1:"hello",message2:"test"},c={name:"stringTemplateAgent",agent:l,mock:l,samples:[{inputs:u,params:{template:"${message1}: ${message2}"},result:"hello: test"},{inputs:u,params:{template:["${message1}: ${message2}","${message2}: ${message1}"]},result:["hello: test","test: hello"]},{inputs:u,params:{template:{apple:"${message1}",lemon:"${message2}"}},result:{apple:"hello",lemon:"test"}},{inputs:u,params:{template:[{apple:"${message1}",lemon:"${message2}"}]},result:[{apple:"hello",lemon:"test"}]},{inputs:u,params:{template:{apple:"${message1}",lemon:["${message2}"]}},result:{apple:"hello",lemon:["test"]}},{inputs:{agent:"openAiAgent",row:"hello world",params:{text:"message"}},params:{template:{version:.5,nodes:{ai:{agent:"${agent}",isResult:!0,params:"${params}",inputs:{prompt:"${row}"}}}}},result:{nodes:{ai:{agent:"openAiAgent",inputs:{prompt:"hello world"},isResult:!0,params:{text:"message"}}},version:.5}}],description:"Template agent",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},g=async({namedInputs:e})=>{const{text:t,data:a}=e;if(a)return JSON.stringify(a,null,2);const r=("\n"+t).match(/\n```[a-zA-z]*([\s\S]*?)\n```/);return r?JSON.parse(r[1]):JSON.parse(t)},y={apple:"red",lemon:"yellow"},d=JSON.stringify(y),h=["```",d,"```"].join("\n"),b=["```json",d,"```"].join("\n"),f=["```JSON",d,"```"].join("\n"),w={name:"jsonParserAgent",agent:g,mock:g,inputs:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},output:{type:"string"},samples:[{inputs:{data:y},params:{},result:JSON.stringify(y,null,2)},{inputs:{text:JSON.stringify(y,null,2)},params:{},result:y},{inputs:{text:h},params:{},result:y},{inputs:{text:b},params:{},result:y},{inputs:{text:f},params:{},result:y}],description:"Template agent",category:["string"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},A=async({namedInputs:e,params:t})=>{const{suffix:a}=t,r=e.text.trim().replace(/[\s-_]+/g," ").toLowerCase().split(" ");a&&r[r.length-1]!==a&&r.push(a);const s=r.join(" ");return{lowerCamelCase:r.map(((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1))).join(""),snakeCase:s.replace(/\s+/g,"_"),kebabCase:s.replace(/\s+/g,"-"),normalized:s}},I={name:"stringCaseVariantsAgent",agent:A,mock:A,samples:[{inputs:{text:"this is a pen"},params:{},result:{kebabCase:"this-is-a-pen",lowerCamelCase:"thisIsAPen",normalized:"this is a pen",snakeCase:"this_is_a_pen"}},{inputs:{text:"string case variants"},params:{suffix:"agent"},result:{kebabCase:"string-case-variants-agent",lowerCamelCase:"stringCaseVariantsAgent",normalized:"string case variants agent",snakeCase:"string_case_variants_agent"}}],description:"Format String Cases agent",category:["string"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},T=(t,s)=>async n=>{const{namedInputs:o,log:p,debugInfo:i,params:m,forNestedGraph:l}=n;e(!!l,"Please update graphai to 0.5.19 or higher");const{agents:u,graphOptions:c,onLogCallback:g}=l,{taskManager:y}=c,d=m.throwError??!1;if(y){const t=y.getStatus(!1);e(t.concurrency>t.running,`nestedAgent: Concurrency is too low: ${t.concurrency}`)}e(!!t,"nestedAgent: graph is required");const{nodes:h}=t,b={...t,nodes:{...h},version:a},f=Object.keys(o);f.length>0&&f.forEach((e=>{void 0===b.nodes[e]?b.nodes[e]={value:o[e]}:b.nodes[e].value=o[e]}));try{void 0===b.version&&i.version&&(b.version=i.version);const e=new r(b,u||{},c);g&&(e.onLogCallback=g);const t=await e.run(!1);return p?.push(...e.transactionLogs()),s&&s.resultNodeId?t[s.resultNodeId]:t}catch(e){if(e instanceof Error&&!d)return{onError:{message:e.message,error:e}};throw e}},k=async t=>{const{forNestedGraph:a}=t,{graphData:r}=a??{graphData:{nodes:{}}};return e(!!r,"No GraphData"),await T(r)(t)},x={name:"nestedAgent",agent:k,mock:k,samples:[{inputs:{message:"hello"},params:{},result:{test:["hello"]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"messages"},inputs:{messages:[":message"]},isResult:!0}}}}],description:"nested Agent",category:["graph"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},v=T({version:a,nodes:{isNewText:{if:":newText",agent:"copyAgent",inputs:{text:":newText"}},isOldText:{unless:":newText",agent:"copyAgent",inputs:{text:":oldText"}},updatedText:{agent:"copyAgent",anyInput:!0,inputs:{text:[":isNewText.text",":isOldText.text"]}},resultText:{isResult:!0,agent:"copyAgent",anyInput:!0,inputs:{text:":updatedText.text.$0"}}}},{resultNodeId:"resultText"}),j={name:"updateTextAgent",agent:v,mock:v,samples:[{inputs:{newText:"new",oldText:"old"},params:{},result:{text:"new"}},{inputs:{newText:"",oldText:"old"},params:{},result:{text:"old"}}],description:"",category:[],author:"",repository:"",tools:[],license:"",hasGraphData:!0},E=async({namedInputs:t})=>{const a=" Set inputs: { array: :arrayNodeId, item: :itemNodeId }";n("pushAgent",t,a);const{item:r,items:s}=t;e(!(!r&&!s),"pushAgent: namedInputs.item is UNDEFINED!"+a);const o=t.array.map((e=>e));return r?o.push(r):s.forEach((e=>{o.push(e)})),{array:o}},N={name:"pushAgent",agent:E,mock:E,inputs:{type:"object",properties:{array:{type:"array",description:"the array to push an item to"},item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item push into the array"},items:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item push into the array"}},required:["array"]},output:{type:"object",properties:{array:{type:"array"}}},samples:[{inputs:{array:[1,2],item:3},params:{},result:{array:[1,2,3]}},{inputs:{array:[{apple:1}],item:{lemon:2}},params:{},result:{array:[{apple:1},{lemon:2}]}},{inputs:{array:[{apple:1}],items:[{lemon:2},{banana:3}]},params:{},result:{array:[{apple:1},{lemon:2},{banana:3}]}}],description:"push Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},M=async({namedInputs:e})=>{n("popAgent",e);const t=e.array.map((e=>e)),a=t.pop();return{array:t,item:a}},_={name:"popAgent",agent:M,mock:M,inputs:{type:"object",properties:{array:{type:"array",description:"the array to pop an item from"}},required:["array"]},output:{type:"object",properties:{item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item popped from the array"},array:{type:"array",description:"the remaining array"}}},samples:[{inputs:{array:[1,2,3]},params:{},result:{array:[1,2],item:3}},{inputs:{array:["a","b","c"]},params:{},result:{array:["a","b"],item:"c"}},{inputs:{array:[1,2,3],array2:["a","b","c"]},params:{},result:{array:[1,2],item:3}}],description:"Pop Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},R=async({namedInputs:e})=>{n("shiftAgent",e);const t=e.array.map((e=>e)),a=t.shift();return{array:t,item:a}},S={name:"shiftAgent",agent:R,mock:R,inputs:{type:"object",properties:{array:{type:"array",description:"the array to shift an item from"}},required:["array"]},output:{type:"object",properties:{item:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}],description:"the item shifted from the array"},array:{type:"array",description:"the remaining array"}}},samples:[{inputs:{array:[1,2,3]},params:{},result:{array:[2,3],item:1}},{inputs:{array:["a","b","c"]},params:{},result:{array:["b","c"],item:"a"}}],description:"shift Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},O=async({namedInputs:e,params:t})=>{n("arrayFlatAgent",e);const a=t.depth??1;return{array:e.array.map((e=>e)).flat(a)}},P={name:"arrayFlatAgent",agent:O,mock:O,inputs:{type:"object",properties:{array:{type:"array",description:"flat array"}},required:["array"]},output:{type:"object",properties:{array:{type:"array",description:"the remaining array"}}},params:{type:"object",properties:{depth:{type:"number",description:"array depth"}}},samples:[{inputs:{array:[[1],[2],[3]]},params:{},result:{array:[1,2,3]}},{inputs:{array:[[1],[2],[[3]]]},params:{},result:{array:[1,2,[3]]}},{inputs:{array:[[1],[2],[[3]]]},params:{depth:2},result:{array:[1,2,3]}},{inputs:{array:[["a"],["b"],["c"]]},params:{},result:{array:["a","b","c"]}}],description:"Array Flat Agent",category:["array"],author:"Receptron team",repository:"https://github.com/receptron/graphai",cacheType:"pureAgent",license:"MIT"},$=async({namedInputs:e,params:t})=>{n("arrayJoinAgent",e);const a=t.separator??"",{flat:r}=t;return{text:r?e.array.flat(r).join(a):e.array.join(a)}},D={name:"arrayJoinAgent",agent:$,mock:$,inputs:{type:"object",properties:{array:{type:"array",description:"array join"}},required:["array"]},params:{type:"object",properties:{separator:{type:"string",description:"array join separator"},flat:{type:"number",description:"array flat depth"}}},output:{type:"object",properties:{text:{type:"string",description:"joined text"}}},samples:[{inputs:{array:[[1],[2],[3]]},params:{},result:{text:"123"}},{inputs:{array:[[1],[2],[[3]]]},params:{},result:{text:"123"}},{inputs:{array:[["a"],["b"],["c"]]},params:{},result:{text:"abc"}},{inputs:{array:[[1],[2],[3]]},params:{separator:"|"},result:{text:"1|2|3"}},{inputs:{array:[[[1]],[[2],[3]]]},params:{separator:"|"},result:{text:"1|2,3"}},{inputs:{array:[[[1]],[[2],[3]]]},params:{separator:"|",flat:1},result:{text:"1|2|3"}},{inputs:{array:[[[[1]],[[2],[3]]]]},params:{separator:"|",flat:1},result:{text:"1|2,3"}},{inputs:{array:[[[[1]],[[2],[3]]]]},params:{separator:"|",flat:2},result:{text:"1|2|3"}}],description:"Array Join Agent",category:["array"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},C=async({namedInputs:t})=>{e(!!t,"dotProductAgent: namedInputs is UNDEFINED!");const a=t.matrix,r=t.vector;if(a[0].length!=r.length)throw new Error(`dotProduct: Length of vectors do not match. ${a[0].length}, ${r.length}`);return a.map((e=>e.reduce(((e,t,a)=>e+t*r[a]),0)))},q={name:"dotProductAgent",agent:C,mock:C,inputs:{type:"object",properties:{matrix:{type:"array",description:"two dimentional matrix",items:{type:"array",items:{type:"number"}}},vector:{type:"array",description:"the vector",items:{type:"number"}}},required:["matrix","vector"]},output:{type:"array"},samples:[{inputs:{matrix:[[1,2],[3,4],[5,6]],vector:[3,2]},params:{},result:[7,17,27]},{inputs:{matrix:[[1,2],[2,3]],vector:[1,2]},params:{},result:[5,8]}],description:"dotProduct Agent",category:["matrix"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},V=async({params:t,namedInputs:a})=>{e(!!a,"sortByValue: namedInputs is UNDEFINED!"),e(!!a.array,"sortByValue: namedInputs.array is UNDEFINED!"),e(!!a.values,"sortByValue: namedInputs.values is UNDEFINED!");const r=t?.assendant?-1:1,s=a.array,n=a.values;return s.map(((e,t)=>({item:e,value:n[t]}))).sort(((e,t)=>(t.value-e.value)*r)).map((e=>e.item))},F={name:"sortByValuesAgent",agent:V,mock:V,inputs:{type:"object",properties:{array:{type:"array",description:"the array to sort"},values:{type:"array",description:"values associated with items in the array"}},required:["array","values"]},output:{type:"array"},samples:[{inputs:{array:["banana","orange","lemon","apple"],values:[2,5,6,4]},params:{},result:["lemon","orange","apple","banana"]},{inputs:{array:["banana","orange","lemon","apple"],values:[2,5,6,4]},params:{assendant:!0},result:["banana","apple","orange","lemon"]}],description:"sortByValues Agent",category:["matrix"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},z=async({params:e,filterParams:t})=>e.filterParams?t:e,U={name:"echoAgent",agent:z,mock:z,samples:[{inputs:{},params:{text:"this is test"},result:{text:"this is test"}},{inputs:{},params:{text:"If you add filterParams option, it will respond to filterParams",filterParams:!0},result:{}}],description:"Echo agent",category:["test"],cacheType:"pureAgent",author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},J=async({params:e})=>({list:new Array(e.count).fill(void 0).map(((e,t)=>t))}),Y={name:"countingAgent",agent:J,mock:J,samples:[{inputs:{},params:{count:4},result:{list:[0,1,2,3]}}],description:"Counting agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},K=async({params:e})=>({messages:new Array(e.count).fill(void 0).map((()=>e.message))}),H={name:"copyMessageAgent",agent:K,mock:K,samples:[{inputs:{},params:{count:4,message:"hello"},result:{messages:["hello","hello","hello","hello"]}}],description:"CopyMessage agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},L=async({namedInputs:t,params:a})=>{e(o(t),"copy2ArrayAgent: namedInputs is UNDEFINED!");const r=t.item?t.item:t;return new Array(a.count).fill(void 0).map((()=>r))},G={name:"copy2ArrayAgent",agent:L,mock:L,samples:[{inputs:{item:{message:"hello"}},params:{count:10},result:[{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"}]},{inputs:{message:"hello"},params:{count:10},result:[{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"},{message:"hello"}]},{inputs:{item:"hello"},params:{count:10},result:["hello","hello","hello","hello","hello","hello","hello","hello","hello","hello"]}],description:"Copy2Array agent",category:["test"],cacheType:"pureAgent",author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},B=async({debugInfo:{nodeId:e},namedInputs:t})=>{n("mergeNodeIdAgent",t);return t.array.reduce(((e,t)=>({...e,...t})),{[e]:"hello"})},X={name:"mergeNodeIdAgent",agent:B,mock:B,samples:[{inputs:{array:[{message:"hello"}]},params:{},result:{message:"hello",test:"hello"}}],description:"merge node id agent",category:["test"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},W=async({params:e,filterParams:t,namedInputs:a})=>{const r=e.message??a.message??"";for await(const a of r.split(""))t.streamTokenCallback&&t.streamTokenCallback(a),await s(e.sleep||100);return{message:r}},Q={name:"streamMockAgent",agent:W,mock:W,inputs:{anyOf:[{type:"object",properties:{message:{type:"string",description:"streaming message"}}},{type:"array"}]},samples:[{inputs:{},params:{message:"this is params test"},result:{message:"this is params test"}},{inputs:{message:"this is named inputs test"},params:{},result:{message:"this is named inputs test"}}],description:"Stream mock agent",category:["test"],author:"Isamu Arimoto",repository:"https://github.com/receptron/graphai",license:"MIT",stream:!0},Z=async({params:t,namedInputs:s,log:n,debugInfo:o,forNestedGraph:p})=>{e(!!p,"Please update graphai to 0.5.19 or higher");const{agents:i,graphData:m,graphOptions:l,onLogCallback:u}=p,{taskManager:c}=l;if(c){const t=c.getStatus();e(t.concurrency>t.running,`mapAgent: Concurrency is too low: ${t.concurrency}`)}e(!!s.rows,"mapAgent: rows property is required in namedInput"),e(!!m,"mapAgent: graph is required");const g=s.rows.map((e=>e));t.limit&&t.limit{const t="rows"===e?"row":e;void 0===b.nodes[t]?b.nodes[t]={value:s[e]}:"agent"in b.nodes[t]||(b.nodes[t].value=s[e])}));try{void 0===b.version&&o.version&&(b.version=o.version);const e=g.map(((e,t)=>{const a=new r(b,i||{},l);return a.injectValue("row",e,"__mapAgent_inputs__"),a.injectValue("__mapIndex",t,"__mapAgent_inputs__"),u&&(a.onLogCallback=u),a})),a=e.map((e=>e.run(y))),s=await Promise.all(a),p=Object.keys(s[0]);if(n){const t=e.map(((e,t)=>e.transactionLogs().map((e=>(e.mapIndex=t,e)))));n.push(...t.flat())}if(t.compositeResult){return p.reduce(((e,t)=>(e[t]=s.map((e=>e[t])),e)),{})}return s}catch(e){if(e instanceof Error&&!d)return{onError:{message:e.message,error:e}};throw e}},ee={name:"mapAgent",agent:Z,mock:Z,samples:[{inputs:{rows:[1,2]},params:{},result:[{test:[1]},{test:[2]}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]},isResult:!0}}}},{inputs:{rows:["apple","orange","banana","lemon","melon","pineapple","tomato"]},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${word}."},inputs:{word:":row"},isResult:!0}}},result:[{node2:"I love apple."},{node2:"I love orange."},{node2:"I love banana."},{node2:"I love lemon."},{node2:"I love melon."},{node2:"I love pineapple."},{node2:"I love tomato."}]},{inputs:{rows:[{fruit:"apple"},{fruit:"orange"}]},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${item}."},inputs:{item:":row.fruit"},isResult:!0}}},result:[{node2:"I love apple."},{node2:"I love orange."}]},{inputs:{rows:[{fruit:"apple"},{fruit:"orange"}],name:"You",verb:"like"},params:{},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"${name} ${verb} ${fruit}."},inputs:{fruit:":row.fruit",name:":name",verb:":verb"},isResult:!0}}},result:[{node2:"You like apple."},{node2:"You like orange."}]},{inputs:{rows:[1,2]},params:{resultAll:!0},result:[{__mapIndex:0,test:[1],row:1},{__mapIndex:1,test:[2],row:2}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}},{inputs:{rows:[1,2]},params:{resultAll:!0},result:[{__mapIndex:0,map:[{test:1},{test:1}],row:1,test:1},{__mapIndex:1,map:[{test:2},{test:2}],test:2,row:2}],graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"row"},inputs:{row:":row"}},map:{agent:"mapAgent",inputs:{rows:[":test",":test"]},graph:{nodes:{test:{isResult:!0,agent:"copyAgent",params:{namedKey:"row"},inputs:{row:":row"}}}}}}}},{inputs:{rows:[1,2]},params:{compositeResult:!0},result:{test:[[1],[2]]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]},isResult:!0}}}},{inputs:{rows:["apple","orange","banana","lemon","melon","pineapple","tomato"]},params:{compositeResult:!0},graph:{nodes:{node2:{agent:"stringTemplateAgent",params:{template:"I love ${row}."},inputs:{row:":row"},isResult:!0}}},result:{node2:["I love apple.","I love orange.","I love banana.","I love lemon.","I love melon.","I love pineapple.","I love tomato."]}},{inputs:{rows:[1,2]},params:{resultAll:!0,compositeResult:!0},result:{test:[[1],[2]],__mapIndex:[0,1],row:[1,2]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}},{inputs:{rows:[1,2]},params:{resultAll:!0,compositeResult:!0},result:{__mapIndex:[0,1],test:[[1],[2]],map:[{test:[[[1]],[[1]]]},{test:[[[2]],[[2]]]}],row:[1,2]},graph:{nodes:{test:{agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}},map:{agent:"mapAgent",inputs:{rows:[":test",":test"]},params:{compositeResult:!0},graph:{nodes:{test:{isResult:!0,agent:"copyAgent",params:{namedKey:"rows"},inputs:{rows:[":row"]}}}}}}}}],description:"Map Agent",category:["graph"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},te=async({namedInputs:t})=>(e(o(t),"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }"),e(!!t?.array,"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }"),t.array.reduce(((e,t)=>((Array.isArray(t)?t:[t]).forEach((t=>{Object.keys(t).forEach((a=>{const r=t[a];e[a]?e[a]+=r:e[a]=r}))})),e)),{})),ae={name:"totalAgent",agent:te,mock:te,inputs:{type:"object",properties:{array:{type:"array",description:"the array"}},required:["array"]},output:{type:"object"},samples:[{inputs:{array:[{a:1},{a:2},{a:3}]},params:{},result:{a:6}},{inputs:{array:[[{a:1,b:-1},{c:10}],[{a:2,b:-1}],[{a:3,b:-2},{d:-10}]]},params:{},result:{a:6,b:-4,c:10,d:-10}},{inputs:{array:[{a:1}]},params:{},result:{a:1}},{inputs:{array:[{a:1},{a:2}]},params:{},result:{a:3}},{inputs:{array:[{a:1},{a:2},{a:3}]},params:{},result:{a:6}},{inputs:{array:[{a:1,b:1},{a:2,b:2},{a:3,b:0}]},params:{},result:{a:6,b:3}},{inputs:{array:[{a:1},{a:2,b:2},{a:3,b:0}]},params:{},result:{a:6,b:2}}],description:"Returns the sum of input values",category:["data"],author:"Satoshi Nakajima",repository:"https://github.com/snakajima/graphai",license:"MIT"},re=async({namedInputs:t})=>(e(o(t),"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }"),e(!!t?.array,"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }"),t.array.reduce(((e,t)=>e+t),0)),se={name:"dataSumTemplateAgent",agent:re,mock:re,inputs:{type:"object",properties:{array:{type:"array",description:"the array of numbers to calculate the sum of",items:{type:"integer"}}},required:["array"]},output:{type:"number"},samples:[{inputs:{array:[1]},params:{},result:1},{inputs:{array:[1,2]},params:{},result:3},{inputs:{array:[1,2,3]},params:{},result:6}],description:"Returns the sum of input values",category:["data"],author:"Satoshi Nakajima",repository:"https://github.com/receptron/graphai",license:"MIT"},ne=(e,t,a,r,s,n,o,p,i)=>{const m=r||Object.keys(e),l=new Set(s??[]),u=m.reduce(((t,a)=>{if(!l.has(a)){const r=n&&n[a];r&&r[e[a]]?t[a]=r[e[a]]:t[a]=e[a]}return t}),{});return o&&o.forEach((e=>{void 0!==e.index&&e.index!==t||(u[e.propId]=a[e.from])})),i&&i.forEach((e=>{const t=a[e.from??1];e.equal?u[e.propId]=e.equal===t:e.notEqual&&(u[e.propId]=e.notEqual!==t)})),p&&Object.keys(p).forEach((e=>{const t=u[e];u[e]=u[p[e]],u[p[e]]=t})),u},oe=async({namedInputs:e,params:t})=>{const{include:a,exclude:r,alter:s,inject:n,swap:o,inspect:p}=t,{array:i,item:m}=e;if(i){const[e]=i;return Array.isArray(e)?e.map(((e,t)=>ne(e,t,i,a,r,s,n,o,p))):ne(e,0,i,a,r,s,n,o,p)}return!!m&&ne(m,0,[],a,r,s,n,o,p)},pe={array:[[{color:"red",model:"Model 3",type:"EV",maker:"Tesla",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400}],"Tesla Motors"]},ie={name:"propertyFilterAgent",agent:oe,mock:oe,inputs:{type:"object"},output:{type:"any",properties:{array:{type:"array",description:"the array to apply filter"},item:{type:"object",description:"the object to apply filter"}}},samples:[{inputs:{array:[pe.array[0][0]]},params:{include:["color","model"]},result:{color:"red",model:"Model 3"}},{inputs:{item:pe.array[0][0]},params:{include:["color","model"]},result:{color:"red",model:"Model 3"}},{inputs:pe,params:{include:["color","model"]},result:[{color:"red",model:"Model 3"},{color:"blue",model:"Model Y"}]},{inputs:pe,params:{exclude:["color","model"]},result:[{type:"EV",maker:"Tesla",range:300},{type:"EV",maker:"Tesla",range:400}]},{inputs:{item:pe.array[0][0]},params:{exclude:["color","model"]},result:{type:"EV",maker:"Tesla",range:300}},{inputs:pe,params:{alter:{color:{red:"blue",blue:"red"}}},result:[{color:"blue",model:"Model 3",type:"EV",maker:"Tesla",range:300},{color:"red",model:"Model Y",type:"EV",maker:"Tesla",range:400}]},{inputs:{item:pe.array[0][0]},params:{alter:{color:{red:"blue",blue:"red"}}},result:{color:"blue",model:"Model 3",type:"EV",maker:"Tesla",range:300}},{inputs:pe,params:{swap:{maker:"model"}},result:[{color:"red",model:"Tesla",type:"EV",maker:"Model 3",range:300},{color:"blue",model:"Tesla",type:"EV",maker:"Model Y",range:400}]},{inputs:{item:pe.array[0][0]},params:{swap:{maker:"model"}},result:{color:"red",model:"Tesla",type:"EV",maker:"Model 3",range:300}},{inputs:pe,params:{inject:[{propId:"maker",from:1}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla Motors",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla Motors",range:400}]},{inputs:pe,params:{inject:[{propId:"maker",from:1,index:0}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla Motors",range:300},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400}]},{inputs:pe,params:{inspect:[{propId:"isTesla",equal:"Tesla Motors"},{propId:"isGM",notEqual:"Tesla Motors",from:1}]},result:[{color:"red",model:"Model 3",type:"EV",maker:"Tesla",range:300,isTesla:!0,isGM:!1},{color:"blue",model:"Model Y",type:"EV",maker:"Tesla",range:400,isTesla:!0,isGM:!1}]}],description:"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'",category:["data"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},me=async({namedInputs:t,params:a})=>{const{namedKey:r}=a;return e(o(t),"copyAgent: namedInputs is UNDEFINED!"),r?t[r]:t},le={name:"copyAgent",agent:me,mock:me,inputs:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},output:{anyOf:[{type:"string"},{type:"integer"},{type:"object"},{type:"array"}]},samples:[{inputs:{color:"red",model:"Model 3"},params:{},result:{color:"red",model:"Model 3"}},{inputs:{array:["Hello World","Discarded"]},params:{},result:{array:["Hello World","Discarded"]}},{inputs:{color:"red",model:"Model 3"},params:{namedKey:"color"},result:"red"}],description:"Returns namedInputs",category:["data"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},ue=async({namedInputs:e,params:t})=>{const{url:a,method:r,queryParams:s,headers:n,body:o}=e,p=t.throwError??!1,i=new URL(a),m=n?{...n}:{};if(s){const e=new URLSearchParams(s);i.search=e.toString()}o&&(m["Content-Type"]="application/json");const l={method:r??o?"POST":"GET",headers:new Headers(m),body:o?JSON.stringify(o):void 0};if(t?.debug)return{url:i.toString(),method:l.method,headers:m,body:l.body};const u=await fetch(i.toString(),l);if(!u.ok){const e=u.status,a="json"===(t?.type??"json")?await u.json():await u.text();if(p)throw new Error(`HTTP error: ${e}`);return{onError:{message:`HTTP error: ${e}`,status:e,error:a}}}return await(async()=>{const e=t?.type??"json";if("json"===e)return await u.json();if("text"===e)return u.text();throw new Error(`Unknown Type! ${e}`)})()},ce={name:"vanillaFetchAgent",agent:ue,mock:ue,inputs:{type:"object",properties:{url:{type:"string",description:"baseurl"},method:{type:"string",description:"HTTP method"},headers:{type:"object",description:"HTTP headers"},quaryParams:{type:"object",description:"Query parameters"},body:{anyOf:[{type:"string"},{type:"object"}],description:"body"}},required:["url"]},output:{type:"array"},samples:[{inputs:{url:"https://www.google.com",queryParams:{foo:"bar"},headers:{"x-myHeader":"secret"}},params:{debug:!0},result:{method:"GET",url:"https://www.google.com/?foo=bar",headers:{"x-myHeader":"secret"},body:void 0}},{inputs:{url:"https://www.google.com",body:{foo:"bar"}},params:{debug:!0},result:{method:"POST",url:"https://www.google.com/",headers:{"Content-Type":"application/json"},body:JSON.stringify({foo:"bar"})}}],description:"Retrieves JSON data from the specified URL",category:["service"],author:"Receptron",repository:"https://github.com/receptron/graphai",license:"MIT"},ge=async({params:e,namedInputs:t})=>(await s(e?.duration??10),t),ye={name:"sleeperAgent",agent:ge,mock:ge,samples:[{inputs:{},params:{duration:1},result:{}},{inputs:{array:[{a:1},{b:2}]},params:{duration:1},result:{array:[{a:1},{b:2}]}}],description:"sleeper Agent",category:["sleeper"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"},de=e=>{if(3!==e.length)throw new Error("compare inputs length must must be 3");const t=e.map((e=>Array.isArray(e)?de(e):e)),[a,r,s]=t;if("=="===r)return a===s;if("!="===r)return a!==s;if(">"===r)return Number(a)>Number(s);if(">="===r)return Number(a)>=Number(s);if("<"===r)return Number(a){const a=de(e.array);return t?.value?t?.value[a?"true":"false"]??a:a},be={name:"compareAgent",agent:he,mock:he,inputs:{},output:{},samples:[{inputs:{array:["abc","==","abc"]},params:{value:{true:"a",false:"b"}},result:"a"},{inputs:{array:["abc","==","abca"]},params:{value:{true:"a",false:"b"}},result:"b"},{inputs:{array:["abc","==","abc"]},params:{},result:!0},{inputs:{array:["abc","==","abcd"]},params:{},result:!1},{inputs:{array:["abc","!=","abc"]},params:{},result:!1},{inputs:{array:["abc","!=","abcd"]},params:{},result:!0},{inputs:{array:["10",">","5"]},params:{},result:!0},{inputs:{array:["10",">","15"]},params:{},result:!1},{inputs:{array:[10,">",5]},params:{},result:!0},{inputs:{array:[10,">",15]},params:{},result:!1},{inputs:{array:["10",">=","5"]},params:{},result:!0},{inputs:{array:["10",">=","10"]},params:{},result:!0},{inputs:{array:["10",">=","19"]},params:{},result:!1},{inputs:{array:[10,">=",5]},params:{},result:!0},{inputs:{array:[10,">=",10]},params:{},result:!0},{inputs:{array:[10,">=",19]},params:{},result:!1},{inputs:{array:["10","<","5"]},params:{},result:!1},{inputs:{array:["10","<","15"]},params:{},result:!0},{inputs:{array:[10,"<",5]},params:{},result:!1},{inputs:{array:[10,"<",15]},params:{},result:!0},{inputs:{array:["10","<=","5"]},params:{},result:!1},{inputs:{array:["10","<=","10"]},params:{},result:!0},{inputs:{array:["10","<=","19"]},params:{},result:!0},{inputs:{array:[10,"<=",5]},params:{},result:!1},{inputs:{array:[10,"<=",10]},params:{},result:!0},{inputs:{array:[10,"<=",19]},params:{},result:!0},{inputs:{array:[!0,"||",!1]},params:{},result:!0},{inputs:{array:[!1,"||",!1]},params:{},result:!1},{inputs:{array:[!0,"&&",!1]},params:{},result:!1},{inputs:{array:[!0,"&&",!0]},params:{},result:!0},{inputs:{array:[!0,"XOR",!1]},params:{},result:!0},{inputs:{array:[!1,"XOR",!0]},params:{},result:!0},{inputs:{array:[!1,"XOR",!1]},params:{},result:!1},{inputs:{array:[!0,"XOR",!0]},params:{},result:!1},{inputs:{array:[["aaa","==","aaa"],"||",["aaa","==","bbb"]]},params:{},result:!0},{inputs:{array:[["aaa","==","aaa"],"&&",["aaa","==","bbb"]]},params:{},result:!1},{inputs:{array:[[["aaa","==","aaa"],"&&",["bbb","==","bbb"]],"||",["aaa","&&","bbb"]]},params:{},result:!0}],description:"compare",category:["compare"],author:"Receptron",repository:"https://github.com/receptron/graphai",license:"MIT"},fe=async({namedInputs:t,params:a})=>{const{imageType:r,detail:s}=a,{array:o,prompt:p}=t;n("images2messageAgent",t),e(!!r,"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...");const i=o.map((e=>{const t=((e,t,a)=>"http"===t?{url:e}:{url:`data:image/${t};base64,${e}`,detail:a??"auto"})(e,r,s);return{type:"image_url",image_url:t}}));return p&&i.unshift({type:"text",text:p}),{message:{role:"user",content:i}}},we={name:"images2messageAgent",agent:fe,mock:fe,inputs:{type:"object",properties:{array:{type:"array",description:"the array of base64 image data"},prompt:{type:"string",description:"prompt message"}},required:["array"]},output:{type:"object"},samples:[{inputs:{array:["abcabc","122123"]},params:{imageType:"png"},result:{message:{content:[{image_url:{detail:"auto",url:"data:image/png;base64,abcabc"},type:"image_url"},{image_url:{detail:"auto",url:"data:image/png;base64,122123"},type:"image_url"}],role:"user"}}},{inputs:{array:["abcabc","122123"],prompt:"hello"},params:{imageType:"jpg",detail:"high"},result:{message:{content:[{type:"text",text:"hello"},{image_url:{detail:"high",url:"data:image/jpg;base64,abcabc"},type:"image_url"},{image_url:{detail:"high",url:"data:image/jpg;base64,122123"},type:"image_url"}],role:"user"}}},{inputs:{array:["http://example.com/1.jpg","http://example.com/2.jpg"]},params:{imageType:"http"},result:{message:{content:[{image_url:{url:"http://example.com/1.jpg"},type:"image_url"},{image_url:{url:"http://example.com/2.jpg"},type:"image_url"}],role:"user"}}}],description:"Returns the message data for llm include image",category:["image"],author:"Receptron team",repository:"https://github.com/snakajima/graphai",license:"MIT"},Ae=async({params:e,namedInputs:t})=>{const{array:a,item:r}=t,s=a??[r],n=process.env.OPENAI_API_KEY;if(!n)throw new Error("OPENAI_API_KEY key is not set in environment variables.");const o={"Content-Type":"application/json",Authorization:`Bearer ${n}`},p=await fetch("https://api.openai.com/v1/embeddings",{method:"POST",headers:o,body:JSON.stringify({input:s,model:e?.model??"text-embedding-3-small"})}),i=await p.json();if(!p.ok)throw new Error(`HTTP error! status: ${p.status}`);return i.data.map((e=>e.embedding))},Ie={name:"stringEmbeddingsAgent",agent:Ae,mock:Ae,samples:[],description:"Embeddings Agent",category:["embedding"],author:"Receptron team",repository:"https://github.com/receptron/graphai",license:"MIT"};export{P as arrayFlatAgent,D as arrayJoinAgent,be as compareAgent,G as copy2ArrayAgent,le as copyAgent,H as copyMessageAgent,Y as countingAgent,se as dataSumTemplateAgent,q as dotProductAgent,U as echoAgent,we as images2messageAgent,w as jsonParserAgent,ee as mapAgent,X as mergeNodeIdAgent,x as nestedAgent,_ as popAgent,ie as propertyFilterAgent,N as pushAgent,S as shiftAgent,ye as sleeperAgent,F as sortByValuesAgent,Q as streamMockAgent,I as stringCaseVariantsAgent,Ie as stringEmbeddingsAgent,i as stringSplitterAgent,c as stringTemplateAgent,ae as totalAgent,j as updateTextAgent,ce as vanillaFetchAgent}; //# sourceMappingURL=bundle.esm.min.js.map diff --git a/agents/vanilla_agents/lib/bundle.esm.min.js.map b/agents/vanilla_agents/lib/bundle.esm.min.js.map index ff4cb9c9..5a56153d 100644 --- a/agents/vanilla_agents/lib/bundle.esm.min.js.map +++ b/agents/vanilla_agents/lib/bundle.esm.min.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.esm.min.js","sources":["../src/string_agents/string_splitter_agent.ts","../src/string_agents/string_template_agent.ts","../src/string_agents/json_parser_agent.ts","../src/string_agents/string_case_variants_agent.ts","../src/array_agents/push_agent.ts","../src/array_agents/pop_agent.ts","../src/array_agents/shift_agent.ts","../src/array_agents/array_flat_agent.ts","../src/array_agents/array_join_agent.ts","../src/matrix_agents/dot_product_agent.ts","../src/matrix_agents/sort_by_values_agent.ts","../src/test_agents/echo_agent.ts","../src/test_agents/counting_agent.ts","../src/test_agents/copy_message_agent.ts","../src/test_agents/copy2array_agent.ts","../src/test_agents/merge_node_id_agent.ts","../src/test_agents/stream_mock_agent.ts","../src/graph_agents/nested_agent.ts","../src/graph_agents/map_agent.ts","../src/data_agents/total_agent.ts","../src/data_agents/data_sum_template_agent.ts","../src/data_agents/property_filter_agent.ts","../src/data_agents/copy_agent.ts","../src/service_agents/vanilla_fetch_agent.ts","../src/sleeper_agents/sleeper_agent.ts","../src/compare_agents/compare_agent.ts","../src/images_agents/image_to_message_agent.ts","../src/embedding_agent.ts"],"sourcesContent":["import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent strip one long string into chunks using following parameters\n//\n// chunkSize: number; // default is 2048\n// overlap: number; // default is 1/8th of chunkSize.\n//\n// see example\n// tests/agents/test_string_agent.ts\n//\nconst defaultChunkSize = 2048;\n\nexport const stringSplitterAgent: AgentFunction<\n {\n chunkSize?: number;\n overlap?: number;\n },\n {\n contents: Array;\n count: number;\n chunkSize: number;\n overlap: number;\n },\n {\n text: string;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"stringSplitterAgent: namedInputs is UNDEFINED!\");\n const source = namedInputs.text;\n const chunkSize = params.chunkSize ?? defaultChunkSize;\n const overlap = params.overlap ?? Math.floor(chunkSize / 8);\n const count = Math.floor(source.length / (chunkSize - overlap)) + 1;\n const contents = new Array(count).fill(undefined).map((_, i) => {\n const startIndex = i * (chunkSize - overlap);\n return source.substring(startIndex, startIndex + chunkSize);\n });\n\n return { contents, count, chunkSize, overlap };\n};\n\n// for test and document\nconst sampleInput = {\n text: \"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do.\",\n};\n\nconst sampleParams = { chunkSize: 64 };\nconst sampleResult = {\n contents: [\n \"Here's to the crazy ones, the misfits, the rebels, the troublema\",\n \"roublemakers, the round pegs in the square holes ... the ones wh\",\n \" ones who see things differently -- they're not fond of rules, a\",\n \"rules, and they have no respect for the status quo. ... You can \",\n \"You can quote them, disagree with them, glorify or vilify them, \",\n \"y them, but the only thing you can't do is ignore them because t\",\n \"ecause they change things. ... They push the human race forward,\",\n \"forward, and while some may see them as the crazy ones, we see g\",\n \"we see genius, because the people who are crazy enough to think \",\n \"o think that they can change the world, are the ones who do.\",\n \" do.\",\n ],\n count: 11,\n chunkSize: 64,\n overlap: 8,\n};\n\nconst stringSplitterAgentInfo: AgentFunctionInfo = {\n name: \"stringSplitterAgent\",\n agent: stringSplitterAgent,\n mock: stringSplitterAgent,\n inputs: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"text to be chuncked\",\n },\n },\n required: [\"text\"],\n },\n output: {\n type: \"object\",\n properties: {\n contents: {\n type: \"array\",\n description: \"the array of text chunks\",\n },\n count: {\n type: \"number\",\n description: \"the number of chunks\",\n },\n chunkSize: {\n type: \"number\",\n description: \"the chunk size\",\n },\n overlap: {\n type: \"number\",\n description: \"the overlap size\",\n },\n },\n },\n samples: [\n {\n inputs: sampleInput,\n params: sampleParams,\n result: sampleResult,\n },\n ],\n description: \"This agent strip one long string into chunks using following parameters\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringSplitterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, isObject } from \"graphai\";\n\ntype StringTemplate = string | Record;\ntype StringTemplateObject = StringTemplate | StringTemplate[] | Record;\n\nconst processTemplate: any = (template: StringTemplateObject, match: string, input: string) => {\n if (typeof template === \"string\") {\n if (template === match) {\n return input;\n }\n return template.replace(match, input);\n } else if (Array.isArray(template)) {\n return template.map((item: StringTemplate) => processTemplate(item, match, input));\n }\n\n if (isObject(template)) {\n return Object.keys(template).reduce((tmp: any, key: string) => {\n tmp[key] = processTemplate(template[key], match, input);\n return tmp;\n }, {});\n }\n return template;\n};\n\nexport const stringTemplateAgent: AgentFunction<\n {\n template: StringTemplateObject;\n },\n StringTemplateObject,\n Record\n> = async ({ params, namedInputs }) => {\n if (params.template === undefined) {\n if (namedInputs.text) {\n return namedInputs.text;\n }\n console.warn(\"warning: stringTemplateAgent no template\");\n }\n return Object.keys(namedInputs).reduce((template, key) => {\n return processTemplate(template, \"${\" + key + \"}\", namedInputs[key]);\n }, params.template);\n};\n\nconst sampleNamedInput = { message1: \"hello\", message2: \"test\" };\n\n// for test and document\nconst stringTemplateAgentInfo: AgentFunctionInfo = {\n name: \"stringTemplateAgent\",\n agent: stringTemplateAgent,\n mock: stringTemplateAgent,\n samples: [\n // named\n {\n inputs: sampleNamedInput,\n params: { template: \"${message1}: ${message2}\" },\n result: \"hello: test\",\n },\n {\n inputs: sampleNamedInput,\n params: { template: [\"${message1}: ${message2}\", \"${message2}: ${message1}\"] },\n result: [\"hello: test\", \"test: hello\"],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: \"${message2}\" } },\n result: { apple: \"hello\", lemon: \"test\" },\n },\n {\n inputs: sampleNamedInput,\n params: { template: [{ apple: \"${message1}\", lemon: \"${message2}\" }] },\n result: [{ apple: \"hello\", lemon: \"test\" }],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: [\"${message2}\"] } },\n result: { apple: \"hello\", lemon: [\"test\"] },\n },\n // graphData\n {\n inputs: { agent: \"openAiAgent\", row: \"hello world\", params: { text: \"message\" } },\n params: {\n template: {\n version: 0.5,\n nodes: {\n ai: {\n agent: \"${agent}\",\n isResult: true,\n params: \"${params}\",\n inputs: { prompt: \"${row}\" },\n },\n },\n },\n },\n result: {\n nodes: {\n ai: {\n agent: \"openAiAgent\",\n inputs: {\n prompt: \"hello world\",\n },\n isResult: true,\n params: { text: \"message\" },\n },\n },\n version: 0.5,\n },\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const jsonParserAgent: AgentFunction<\n null,\n unknown,\n {\n text: string;\n data: unknown;\n }\n> = async ({ namedInputs }) => {\n const { text, data } = namedInputs;\n\n if (data) {\n return JSON.stringify(data, null, 2);\n }\n const match = (\"\\n\" + text).match(/\\n```[a-zA-z]*([\\s\\S]*?)\\n```/);\n if (match) {\n return JSON.parse(match[1]);\n }\n return JSON.parse(text);\n};\n\nconst sample_object = { apple: \"red\", lemon: \"yellow\" };\n\nconst json_str = JSON.stringify(sample_object);\nconst md_json1 = [\"```\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json2 = [\"```json\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json3 = [\"```JSON\", json_str, \"```\"].join(\"\\n\");\n\nconst jsonParserAgentInfo: AgentFunctionInfo = {\n name: \"jsonParserAgent\",\n agent: jsonParserAgent,\n mock: jsonParserAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n type: \"string\",\n },\n samples: [\n {\n inputs: { data: sample_object },\n params: {},\n result: JSON.stringify(sample_object, null, 2),\n },\n {\n inputs: { text: JSON.stringify(sample_object, null, 2) },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json1 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json2 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json3 },\n params: {},\n result: sample_object,\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default jsonParserAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const stringCaseVariantsAgent: AgentFunction<\n { suffix?: string },\n { lowerCamelCase: string; snakeCase: string; kebabCase: string; normalized: string },\n { text: string }\n> = async ({ namedInputs, params }) => {\n const { suffix } = params;\n const normalizedArray = namedInputs.text\n .trim()\n .replace(/[\\s-_]+/g, \" \")\n .toLowerCase()\n .split(\" \");\n if (suffix && normalizedArray[normalizedArray.length - 1] !== suffix) {\n normalizedArray.push(suffix);\n }\n const normalized = normalizedArray.join(\" \");\n\n const lowerCamelCase = normalizedArray\n .map((word, index) => {\n if (index === 0) return word;\n return word.charAt(0).toUpperCase() + word.slice(1);\n })\n .join(\"\");\n\n const snakeCase = normalized.replace(/\\s+/g, \"_\");\n const kebabCase = normalized.replace(/\\s+/g, \"-\");\n\n return { lowerCamelCase, snakeCase, kebabCase, normalized };\n};\n\nconst stringCaseVariantsAgentInfo: AgentFunctionInfo = {\n name: \"stringCaseVariantsAgent\",\n agent: stringCaseVariantsAgent,\n mock: stringCaseVariantsAgent,\n samples: [\n {\n inputs: { text: \"this is a pen\" },\n params: {},\n result: {\n kebabCase: \"this-is-a-pen\",\n lowerCamelCase: \"thisIsAPen\",\n normalized: \"this is a pen\",\n snakeCase: \"this_is_a_pen\",\n },\n },\n {\n inputs: { text: \"string case variants\" },\n params: { suffix: \"agent\" },\n result: {\n kebabCase: \"string-case-variants-agent\",\n lowerCamelCase: \"stringCaseVariantsAgent\",\n normalized: \"string case variants agent\",\n snakeCase: \"string_case_variants_agent\",\n },\n },\n ],\n description: \"Format String Cases agent\",\n category: [\"string\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringCaseVariantsAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const pushAgent: AgentFunction }, { array: Array; item?: unknown; items: Array }> = async ({\n namedInputs,\n}) => {\n const extra_message = \" Set inputs: { array: :arrayNodeId, item: :itemNodeId }\";\n arrayValidate(\"pushAgent\", namedInputs, extra_message);\n const { item, items } = namedInputs;\n assert(!!(item || items), \"pushAgent: namedInputs.item is UNDEFINED!\" + extra_message);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n if (item) {\n array.push(item);\n } else {\n items.forEach((item) => {\n array.push(item);\n });\n }\n return {\n array,\n };\n};\n\nconst pushAgentInfo: AgentFunctionInfo = {\n name: \"pushAgent\",\n agent: pushAgent,\n mock: pushAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to push an item to\",\n },\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n items: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2], item: 3 },\n params: {},\n result: { array: [1, 2, 3] },\n },\n {\n inputs: { array: [{ apple: 1 }], item: { lemon: 2 } },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }] },\n },\n {\n inputs: { array: [{ apple: 1 }], items: [{ lemon: 2 }, { banana: 3 }] },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }, { banana: 3 }] },\n },\n ],\n description: \"push Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default pushAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const popAgent: AgentFunction; item: unknown }, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"popAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.pop();\n return { array, item };\n};\n\nconst popAgentInfo: AgentFunctionInfo = {\n name: \"popAgent\",\n agent: popAgent,\n mock: popAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to pop an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item popped from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"a\", \"b\"],\n item: \"c\",\n },\n },\n {\n inputs: {\n array: [1, 2, 3],\n array2: [\"a\", \"b\", \"c\"],\n },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n ],\n description: \"Pop Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default popAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const shiftAgent: AgentFunction, Record, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"shiftAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.shift();\n return { array, item };\n};\n\nconst shiftAgentInfo: AgentFunctionInfo = {\n name: \"shiftAgent\",\n agent: shiftAgent,\n mock: shiftAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to shift an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item shifted from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [2, 3],\n item: 1,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"b\", \"c\"],\n item: \"a\",\n },\n },\n ],\n description: \"shift Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default shiftAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayFlatAgent: AgentFunction<{ depth?: number }, { array: Array }, { array: Array }> = async ({ namedInputs, params }) => {\n arrayValidate(\"arrayFlatAgent\", namedInputs);\n const depth = params.depth ?? 1;\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n return { array: array.flat(depth) };\n};\n\nconst arrayFlatAgentInfo: AgentFunctionInfo = {\n name: \"arrayFlatAgent\",\n agent: arrayFlatAgent,\n mock: arrayFlatAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"flat array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n params: {\n type: \"object\",\n properties: {\n depth: {\n type: \"number\",\n description: \"array depth\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n array: [1, 2, [3]],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: { depth: 2 },\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n array: [\"a\", \"b\", \"c\"],\n },\n },\n ],\n description: \"Array Flat Agent\",\n category: [\"array\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n cacheType: \"pureAgent\",\n license: \"MIT\",\n};\nexport default arrayFlatAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayJoinAgent: AgentFunction<{ separator?: string; flat?: number }, { text: string }, { array: Array }> = async ({\n namedInputs,\n params,\n}) => {\n arrayValidate(\"arrayJoinAgent\", namedInputs);\n const separator = params.separator ?? \"\";\n const { flat } = params;\n\n const text = flat ? namedInputs.array.flat(flat).join(separator) : namedInputs.array.join(separator);\n return { text };\n};\n\nconst arrayJoinAgentInfo: AgentFunctionInfo = {\n name: \"arrayJoinAgent\",\n agent: arrayJoinAgent,\n mock: arrayJoinAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"array join\",\n },\n },\n required: [\"array\"],\n },\n params: {\n type: \"object\",\n properties: {\n separator: {\n type: \"string\",\n description: \"array join separator\",\n },\n flat: {\n type: \"number\",\n description: \"array flat depth\",\n },\n },\n },\n output: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"joined text\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n text: \"abc\",\n },\n },\n //\n {\n inputs: { array: [[1], [2], [3]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 2 },\n result: {\n text: \"1|2|3\",\n },\n },\n ],\n description: \"Array Join Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default arrayJoinAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent calculates the dot product of an array of vectors (A[]) and a vector (B),\n// typically used to calculate cosine similarity of embedding vectors.\n// Inputs:\n// matrix: Two dimentional array of numbers.\n// vector: One dimentional array of numbers.\n// Outputs:\n// { contents: Array } // array of docProduct of each vector (A[]) and vector B\nexport const dotProductAgent: AgentFunction, Array, { matrix: Array>; vector: Array }> = async ({\n namedInputs,\n}) => {\n assert(!!namedInputs, \"dotProductAgent: namedInputs is UNDEFINED!\");\n const matrix = namedInputs.matrix as Array>;\n const vector = namedInputs.vector as Array;\n if (matrix[0].length != vector.length) {\n throw new Error(`dotProduct: Length of vectors do not match. ${matrix[0].length}, ${vector.length}`);\n }\n const contents = matrix.map((vector0) => {\n return vector0.reduce((dotProduct: number, value, index) => {\n return dotProduct + value * vector[index];\n }, 0);\n });\n return contents;\n};\n\nconst dotProductAgentInfo: AgentFunctionInfo = {\n name: \"dotProductAgent\",\n agent: dotProductAgent,\n mock: dotProductAgent,\n inputs: {\n type: \"object\",\n properties: {\n matrix: {\n type: \"array\",\n description: \"two dimentional matrix\",\n items: {\n type: \"array\",\n items: {\n type: \"number\",\n },\n },\n },\n vector: {\n type: \"array\",\n description: \"the vector\",\n items: {\n type: \"number\",\n },\n },\n },\n required: [\"matrix\", \"vector\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n matrix: [\n [1, 2],\n [3, 4],\n [5, 6],\n ],\n vector: [3, 2],\n },\n params: {},\n result: [7, 17, 27],\n },\n {\n inputs: {\n matrix: [\n [1, 2],\n [2, 3],\n ],\n vector: [1, 2],\n },\n params: {},\n result: [5, 8],\n },\n ],\n description: \"dotProduct Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dotProductAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent returned a sorted array of one array (A) based on another array (B).\n// The default sorting order is \"decendant\".\n//\n// Parameters:\n// acendant: Specifies if the sorting order should be acendant. The default is \"false\" (decendant).\n// Inputs:\n// array: Array; // array to be sorted\n// values: Array; // array of numbers for sorting\n//\nexport const sortByValuesAgent: AgentFunction<\n {\n assendant?: boolean;\n },\n Array,\n {\n array: Array;\n values: Array;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"sortByValue: namedInputs is UNDEFINED!\");\n assert(!!namedInputs.array, \"sortByValue: namedInputs.array is UNDEFINED!\");\n assert(!!namedInputs.values, \"sortByValue: namedInputs.values is UNDEFINED!\");\n\n const direction = (params?.assendant ?? false) ? -1 : 1;\n const array: Array = namedInputs.array;\n const values: Array = namedInputs.values;\n const joined = array.map((item, index) => {\n return { item, value: values[index] };\n });\n const contents = joined\n .sort((a, b) => {\n return (b.value - a.value) * direction;\n })\n .map((a) => {\n return a.item;\n });\n return contents;\n};\n\nconst sortByValuesAgentInfo: AgentFunctionInfo = {\n name: \"sortByValuesAgent\",\n agent: sortByValuesAgent,\n mock: sortByValuesAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to sort\",\n },\n values: {\n type: \"array\",\n description: \"values associated with items in the array\",\n },\n },\n required: [\"array\", \"values\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {},\n result: [\"lemon\", \"orange\", \"apple\", \"banana\"],\n },\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {\n assendant: true,\n },\n result: [\"banana\", \"apple\", \"orange\", \"lemon\"],\n },\n ],\n description: \"sortByValues Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sortByValuesAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const echoAgent: AgentFunction = async ({ params, filterParams }) => {\n if (params.filterParams) {\n return filterParams;\n }\n return params;\n};\n\n// for test and document\nconst echoAgentInfo: AgentFunctionInfo = {\n name: \"echoAgent\",\n agent: echoAgent,\n mock: echoAgent,\n samples: [\n {\n inputs: {},\n params: { text: \"this is test\" },\n result: { text: \"this is test\" },\n },\n {\n inputs: {},\n params: {\n text: \"If you add filterParams option, it will respond to filterParams\",\n filterParams: true,\n },\n result: {},\n },\n ],\n description: \"Echo agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default echoAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const countingAgent: AgentFunction<{ count: number }, { list: number[] }> = async ({ params }) => {\n return {\n list: new Array(params.count).fill(undefined).map((_, i) => {\n return i;\n }),\n };\n};\n\n// for test and document\nconst countingAgentInfo: AgentFunctionInfo = {\n name: \"countingAgent\",\n agent: countingAgent,\n mock: countingAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4 },\n result: { list: [0, 1, 2, 3] },\n },\n ],\n description: \"Counting agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default countingAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const copyMessageAgent: AgentFunction<{ count: number; message: string }, { messages: string[] }> = async ({ params }) => {\n return {\n messages: new Array(params.count).fill(undefined).map(() => {\n return params.message;\n }),\n };\n};\n\n// for test and document\nconst copyMessageAgentInfo: AgentFunctionInfo = {\n name: \"copyMessageAgent\",\n agent: copyMessageAgent,\n mock: copyMessageAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4, message: \"hello\" },\n result: { messages: [\"hello\", \"hello\", \"hello\", \"hello\"] },\n },\n ],\n description: \"CopyMessage agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copyMessageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copy2ArrayAgent: AgentFunction<{ count: number }> = async ({ namedInputs, params }) => {\n assert(isNamedInputs(namedInputs), \"copy2ArrayAgent: namedInputs is UNDEFINED!\");\n const input = namedInputs.item ? namedInputs.item : namedInputs;\n return new Array(params.count).fill(undefined).map(() => {\n return input;\n });\n};\n\n// for test and document\nconst copy2ArrayAgentInfo: AgentFunctionInfo = {\n name: \"copy2ArrayAgent\",\n agent: copy2ArrayAgent,\n mock: copy2ArrayAgent,\n samples: [\n {\n inputs: { item: { message: \"hello\" } },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { message: \"hello\" },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { item: \"hello\" },\n params: { count: 10 },\n result: [\"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\"],\n },\n ],\n description: \"Copy2Array agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copy2ArrayAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const mergeNodeIdAgent: AgentFunction, { array: Record[] }> = async ({\n debugInfo: { nodeId },\n namedInputs,\n}) => {\n arrayValidate(\"mergeNodeIdAgent\", namedInputs);\n\n const dataSet = namedInputs.array;\n\n return dataSet.reduce(\n (tmp, input) => {\n return { ...tmp, ...input };\n },\n { [nodeId]: \"hello\" },\n );\n};\n\n// for test and document\nconst mergeNodeIdAgentInfo: AgentFunctionInfo = {\n name: \"mergeNodeIdAgent\",\n agent: mergeNodeIdAgent,\n mock: mergeNodeIdAgent,\n samples: [\n {\n inputs: { array: [{ message: \"hello\" }] },\n params: {},\n result: {\n message: \"hello\",\n test: \"hello\",\n },\n },\n ],\n description: \"merge node id agent\",\n category: [\"test\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default mergeNodeIdAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const streamMockAgent: AgentFunction = async ({ params, filterParams, namedInputs }) => {\n const message = params.message ?? namedInputs.message ?? \"\";\n\n for await (const token of message.split(\"\")) {\n if (filterParams.streamTokenCallback) {\n filterParams.streamTokenCallback(token);\n }\n await sleep(params.sleep || 100);\n }\n\n return { message };\n};\n\n// for test and document\nconst streamMockAgentInfo: AgentFunctionInfo = {\n name: \"streamMockAgent\",\n agent: streamMockAgent,\n mock: streamMockAgent,\n inputs: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n message: {\n type: \"string\",\n description: \"streaming message\",\n },\n },\n },\n {\n type: \"array\",\n },\n ],\n },\n samples: [\n {\n inputs: {},\n params: { message: \"this is params test\" },\n result: { message: \"this is params test\" },\n },\n {\n inputs: { message: \"this is named inputs test\" },\n params: {},\n result: { message: \"this is named inputs test\" },\n },\n ],\n description: \"Stream mock agent\",\n category: [\"test\"],\n author: \"Isamu Arimoto\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n stream: true,\n};\n\nexport default streamMockAgentInfo;\n","import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, StaticNodeData, GraphData } from \"graphai\";\nimport { GraphAI, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const nestedAgentGenerator: (graphData: GraphData) => (context: AgentFunctionContext) => Promise = (graphData: GraphData) => {\n return async (context: AgentFunctionContext) => {\n const { namedInputs, log, debugInfo, params, forNestedGraph } = context;\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n const throwError = params.throwError ?? false;\n if (taskManager) {\n const status = taskManager.getStatus(false);\n assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`);\n }\n assert(!!graphData, \"nestedAgent: graph is required\");\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n if (nodeIds.length > 0) {\n nodeIds.forEach((nodeId) => {\n if (nestedGraphData.nodes[nodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] };\n } else {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n (nestedGraphData.nodes[nodeId] as StaticNodeData)[\"value\"] = namedInputs[nodeId];\n }\n });\n }\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n\n const results = await graphAI.run(false);\n log?.push(...graphAI.transactionLogs());\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n };\n};\n\nexport const nestedAgent: AgentFunction<{ throwError?: boolean }> = async (context) => {\n const { forNestedGraph } = context;\n const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } };\n assert(!!graphData, \"No GraphData\");\n\n return await nestedAgentGenerator(graphData)(context);\n};\n\nconst nestedAgentInfo: AgentFunctionInfo = {\n name: \"nestedAgent\",\n agent: nestedAgent,\n mock: nestedAgent,\n samples: [\n {\n inputs: {\n message: \"hello\",\n },\n params: {},\n result: {\n test: [\"hello\"],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"messages\" },\n inputs: { messages: [\":message\"] },\n isResult: true,\n },\n },\n },\n },\n ],\n description: \"nested Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default nestedAgentInfo;\n","import { GraphAI, AgentFunction, AgentFunctionInfo, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const mapAgent: AgentFunction<\n {\n limit?: number;\n resultAll?: boolean;\n compositeResult?: boolean;\n throwError?: boolean;\n },\n Record\n> = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => {\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n\n if (taskManager) {\n const status = taskManager.getStatus();\n assert(status.concurrency > status.running, `mapAgent: Concurrency is too low: ${status.concurrency}`);\n }\n\n assert(!!namedInputs.rows, \"mapAgent: rows property is required in namedInput\");\n assert(!!graphData, \"mapAgent: graph is required\");\n\n const rows = namedInputs.rows.map((item: any) => item);\n if (params.limit && params.limit < rows.length) {\n rows.length = params.limit; // trim\n }\n const resultAll = params.resultAll ?? false;\n const throwError = params.throwError ?? false;\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n nestedGraphData.nodes[\"__mapIndex\"] = {};\n nodeIds.forEach((nodeId) => {\n const mappedNodeId = nodeId === \"rows\" ? \"row\" : nodeId;\n if (nestedGraphData.nodes[mappedNodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[mappedNodeId] = { value: namedInputs[nodeId] };\n } else if (!(\"agent\" in nestedGraphData.nodes[mappedNodeId])) {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n nestedGraphData.nodes[mappedNodeId][\"value\"] = namedInputs[nodeId];\n }\n });\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphs: Array = rows.map((row: any, index: number) => {\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n graphAI.injectValue(\"row\", row, \"__mapAgent_inputs__\");\n graphAI.injectValue(\"__mapIndex\", index, \"__mapAgent_inputs__\");\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n return graphAI;\n });\n\n const runs = graphs.map((graph) => {\n return graph.run(resultAll);\n });\n const results = await Promise.all(runs);\n const nodeIds = Object.keys(results[0]);\n // assert(nodeIds.length > 0, \"mapAgent: no return values (missing isResult)\");\n\n if (log) {\n const logs = graphs.map((graph, index) => {\n return graph.transactionLogs().map((log) => {\n log.mapIndex = index;\n return log;\n });\n });\n log.push(...logs.flat());\n }\n\n if (params.compositeResult) {\n const compositeResult = nodeIds.reduce((tmp: Record>, nodeId) => {\n tmp[nodeId] = results.map((result) => {\n return result[nodeId];\n });\n return tmp;\n }, {});\n return compositeResult;\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n};\n\nconst mapAgentInfo: AgentFunctionInfo = {\n name: \"mapAgent\",\n agent: mapAgent,\n mock: mapAgent,\n samples: [\n {\n inputs: {\n rows: [1, 2],\n },\n params: {},\n result: [{ test: [1] }, { test: [2] }],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${word}.\",\n },\n inputs: { word: \":row\" },\n isResult: true,\n },\n },\n },\n result: [\n { node2: \"I love apple.\" },\n { node2: \"I love orange.\" },\n { node2: \"I love banana.\" },\n { node2: \"I love lemon.\" },\n { node2: \"I love melon.\" },\n { node2: \"I love pineapple.\" },\n { node2: \"I love tomato.\" },\n ],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${item}.\",\n },\n inputs: { item: \":row.fruit\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"I love apple.\" }, { node2: \"I love orange.\" }],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n name: \"You\",\n verb: \"like\",\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"${name} ${verb} ${fruit}.\",\n },\n inputs: { fruit: \":row.fruit\", name: \":name\", verb: \":verb\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"You like apple.\" }, { node2: \"You like orange.\" }],\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n test: [1],\n row: 1,\n },\n {\n __mapIndex: 1,\n test: [2],\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n map: [\n {\n test: 1,\n },\n {\n test: 1,\n },\n ],\n row: 1,\n test: 1,\n },\n {\n __mapIndex: 1,\n map: [\n {\n test: 2,\n },\n {\n test: 2,\n },\n ],\n test: 2,\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n },\n },\n },\n },\n },\n },\n\n // old response\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${row}.\",\n },\n inputs: { row: \":row\" },\n isResult: true,\n },\n },\n },\n result: {\n node2: [\"I love apple.\", \"I love orange.\", \"I love banana.\", \"I love lemon.\", \"I love melon.\", \"I love pineapple.\", \"I love tomato.\"],\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n __mapIndex: [0, 1],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n __mapIndex: [0, 1],\n test: [[1], [2]],\n map: [\n {\n test: [[[1]], [[1]]],\n },\n {\n test: [[[2]], [[2]]],\n },\n ],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n },\n },\n },\n ],\n description: \"Map Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default mapAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const totalAgent: AgentFunction, Record, { array: Record[] }> = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((result, input) => {\n const inputArray = Array.isArray(input) ? input : [input];\n inputArray.forEach((innerInput) => {\n Object.keys(innerInput).forEach((key) => {\n const value = innerInput[key];\n if (result[key]) {\n result[key] += value;\n } else {\n result[key] = value;\n }\n });\n });\n return result;\n }, {});\n};\n\n//\nconst totalAgentInfo: AgentFunctionInfo = {\n name: \"totalAgent\",\n agent: totalAgent,\n mock: totalAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: { array: [[{ a: 1, b: -1 }, { c: 10 }], [{ a: 2, b: -1 }], [{ a: 3, b: -2 }, { d: -10 }]] },\n params: {},\n result: { a: 6, b: -4, c: 10, d: -10 },\n },\n {\n inputs: { array: [{ a: 1 }] },\n params: {},\n result: { a: 1 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }] },\n params: {},\n result: { a: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: {\n array: [\n { a: 1, b: 1 },\n { a: 2, b: 2 },\n { a: 3, b: 0 },\n ],\n },\n params: {},\n result: { a: 6, b: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2, b: 2 }, { a: 3, b: 0 }] },\n params: {},\n result: { a: 6, b: 2 },\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default totalAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const dataSumTemplateAgent: AgentFunction = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((tmp, input) => {\n return tmp + input;\n }, 0);\n};\n\nconst dataSumTemplateAgentInfo: AgentFunctionInfo = {\n name: \"dataSumTemplateAgent\",\n agent: dataSumTemplateAgent,\n mock: dataSumTemplateAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of numbers to calculate the sum of\",\n items: {\n type: \"integer\",\n },\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"number\",\n },\n samples: [\n {\n inputs: { array: [1] },\n params: {},\n result: 1,\n },\n {\n inputs: { array: [1, 2] },\n params: {},\n result: 3,\n },\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: 6,\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dataSumTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nconst applyFilter = (\n object: any,\n index: number,\n arrayInputs: any,\n include: Array | undefined,\n exclude: Array | undefined,\n alter: Record> | undefined,\n inject: Array> | undefined,\n swap: Record | undefined,\n inspect: Array> | undefined,\n) => {\n const propIds = include ? include : Object.keys(object);\n const excludeSet = new Set(exclude ?? []);\n const result = propIds.reduce((tmp: Record, propId) => {\n if (!excludeSet.has(propId)) {\n const mapping = alter && alter[propId];\n if (mapping && mapping[object[propId]]) {\n tmp[propId] = mapping[object[propId]];\n } else {\n tmp[propId] = object[propId];\n }\n }\n return tmp;\n }, {});\n\n if (inject) {\n inject.forEach((item) => {\n if (item.index === undefined || item.index === index) {\n result[item.propId] = arrayInputs[item.from];\n }\n });\n }\n if (inspect) {\n inspect.forEach((item) => {\n const value = arrayInputs[item.from ?? 1]; // default is arrayInputs[1]\n if (item.equal) {\n result[item.propId] = item.equal === value;\n } else if (item.notEqual) {\n result[item.propId] = item.notEqual !== value;\n }\n });\n }\n if (swap) {\n Object.keys(swap).forEach((key) => {\n const tmp = result[key];\n result[key] = result[swap[key]];\n result[swap[key]] = tmp;\n });\n }\n return result;\n};\n\nexport const propertyFilterAgent: AgentFunction<{\n include?: Array;\n exclude?: Array;\n alter?: Record>;\n inject?: Array>;\n inspect?: Array>;\n swap?: Record;\n}> = async ({ namedInputs, params }) => {\n const { include, exclude, alter, inject, swap, inspect } = params;\n const { array, item } = namedInputs;\n if (array) {\n // This is advanced usage, including \"inject\" and \"inspect\", which uses\n // array[1], array[2], ...\n const [target] = array; // Extract the first one\n if (Array.isArray(target)) {\n return target.map((item, index) => applyFilter(item, index, array, include, exclude, alter, inject, swap, inspect));\n }\n return applyFilter(target, 0, array, include, exclude, alter, inject, swap, inspect);\n } else if (item) {\n return applyFilter(item, 0, [], include, exclude, alter, inject, swap, inspect);\n }\n return false;\n};\n\nconst testInputs = {\n array: [\n [\n { color: \"red\", model: \"Model 3\", type: \"EV\", maker: \"Tesla\", range: 300 },\n { color: \"blue\", model: \"Model Y\", type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n \"Tesla Motors\",\n ],\n};\n\nconst propertyFilterAgentInfo: AgentFunctionInfo = {\n name: \"propertyFilterAgent\",\n agent: propertyFilterAgent,\n mock: propertyFilterAgent,\n inputs: {\n type: \"object\",\n },\n output: {\n type: \"any\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to apply filter\",\n },\n item: {\n type: \"object\",\n description: \"the object to apply filter\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [testInputs.array[0][0]] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: testInputs,\n params: { include: [\"color\", \"model\"] },\n result: [\n { color: \"red\", model: \"Model 3\" },\n { color: \"blue\", model: \"Model Y\" },\n ],\n },\n {\n inputs: testInputs,\n params: { exclude: [\"color\", \"model\"] },\n result: [\n { type: \"EV\", maker: \"Tesla\", range: 300 },\n { type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { exclude: [\"color\", \"model\"] },\n result: { type: \"EV\", maker: \"Tesla\", range: 300 },\n },\n {\n inputs: testInputs,\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: [\n {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n {\n color: \"red\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { swap: { maker: \"model\" } },\n result: [\n {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model Y\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { swap: { maker: \"model\" } },\n result: {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1, index: 0 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: {\n inspect: [\n { propId: \"isTesla\", equal: \"Tesla Motors\" }, // from: 1 is implied\n { propId: \"isGM\", notEqual: \"Tesla Motors\", from: 1 },\n ],\n },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n isTesla: true,\n isGM: false,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n isTesla: true,\n isGM: false,\n },\n ],\n },\n ],\n description: \"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default propertyFilterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copyAgent: AgentFunction<{\n namedKey?: string;\n}> = async ({ namedInputs, params }) => {\n const { namedKey } = params;\n assert(isNamedInputs(namedInputs), \"copyAgent: namedInputs is UNDEFINED!\");\n if (namedKey) {\n return namedInputs[namedKey];\n }\n return namedInputs;\n};\n\nconst copyAgentInfo: AgentFunctionInfo = {\n name: \"copyAgent\",\n agent: copyAgent,\n mock: copyAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n samples: [\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: {},\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { array: [\"Hello World\", \"Discarded\"] },\n params: {},\n result: { array: [\"Hello World\", \"Discarded\"] },\n },\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: { namedKey: \"color\" },\n result: \"red\",\n },\n ],\n description: \"Returns namedInputs\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default copyAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const vanillaFetchAgent: AgentFunction<{ debug?: boolean; type?: string; throwError?: boolean }, any, any> = async ({ namedInputs, params }) => {\n const { url, method, queryParams, headers, body } = namedInputs;\n const throwError = params.throwError ?? false;\n\n const url0 = new URL(url);\n const headers0 = headers ? { ...headers } : {};\n\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n url0.search = params.toString();\n }\n\n if (body) {\n headers0[\"Content-Type\"] = \"application/json\";\n }\n\n const fetchOptions: RequestInit = {\n method: (method ?? body) ? \"POST\" : \"GET\",\n headers: new Headers(headers0),\n body: body ? JSON.stringify(body) : undefined,\n };\n\n if (params?.debug) {\n return {\n url: url0.toString(),\n method: fetchOptions.method,\n headers: headers0,\n body: fetchOptions.body,\n };\n }\n\n const response = await fetch(url0.toString(), fetchOptions);\n\n if (!response.ok) {\n const status = response.status;\n const type = params?.type ?? \"json\";\n const error = type === \"json\" ? await response.json() : await response.text();\n if (throwError) {\n throw new Error(`HTTP error: ${status}`);\n }\n return {\n onError: {\n message: `HTTP error: ${status}`,\n status,\n error,\n },\n };\n }\n\n const result = await (async () => {\n const type = params?.type ?? \"json\";\n if (type === \"json\") {\n return await response.json();\n } else if (type === \"text\") {\n return response.text();\n }\n throw new Error(`Unknown Type! ${type}`);\n })();\n\n return result;\n};\n\nconst vanillaFetchAgentInfo: AgentFunctionInfo = {\n name: \"vanillaFetchAgent\",\n agent: vanillaFetchAgent,\n mock: vanillaFetchAgent,\n inputs: {\n type: \"object\",\n properties: {\n url: {\n type: \"string\",\n description: \"baseurl\",\n },\n method: {\n type: \"string\",\n description: \"HTTP method\",\n },\n headers: {\n type: \"object\",\n description: \"HTTP headers\",\n },\n quaryParams: {\n type: \"object\",\n description: \"Query parameters\",\n },\n body: {\n anyOf: [{ type: \"string\" }, { type: \"object\" }],\n description: \"body\",\n },\n },\n required: [\"url\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: { url: \"https://www.google.com\", queryParams: { foo: \"bar\" }, headers: { \"x-myHeader\": \"secret\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"GET\",\n url: \"https://www.google.com/?foo=bar\",\n headers: {\n \"x-myHeader\": \"secret\",\n },\n body: undefined,\n },\n },\n {\n inputs: { url: \"https://www.google.com\", body: { foo: \"bar\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"POST\",\n url: \"https://www.google.com/\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ foo: \"bar\" }),\n },\n },\n ],\n description: \"Retrieves JSON data from the specified URL\",\n category: [\"service\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default vanillaFetchAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const sleeperAgent: AgentFunction<{ duration?: number }> = async ({ params, namedInputs }) => {\n await sleep(params?.duration ?? 10);\n return namedInputs;\n};\n\nconst sleeperAgentInfo: AgentFunctionInfo = {\n name: \"sleeperAgent\",\n agent: sleeperAgent,\n mock: sleeperAgent,\n samples: [\n {\n inputs: {},\n params: { duration: 1 },\n result: {},\n },\n {\n inputs: { array: [{ a: 1 }, { b: 2 }] },\n params: { duration: 1 },\n result: {\n array: [{ a: 1 }, { b: 2 }],\n },\n },\n ],\n description: \"sleeper Agent\",\n category: [\"sleeper\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sleeperAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\ntype CompareDataItem = string | number | boolean | CompareData;\ntype CompareData = CompareDataItem[];\n\nconst compare = (_array: CompareData): boolean => {\n if (_array.length !== 3) {\n throw new Error(`compare inputs length must must be 3`);\n }\n const array = _array.map((value) => {\n if (Array.isArray(value)) {\n return compare(value);\n }\n return value;\n });\n const [a, operator, b] = array;\n if (operator === \"==\") {\n return a === b;\n }\n if (operator === \"!=\") {\n return a !== b;\n }\n if (operator === \">\") {\n return Number(a) > Number(b);\n }\n if (operator === \">=\") {\n return Number(a) >= Number(b);\n }\n if (operator === \"<\") {\n return Number(a) < Number(b);\n }\n if (operator === \"<=\") {\n return Number(a) <= Number(b);\n }\n if (operator === \"||\") {\n return !!a || !!b;\n }\n if (operator === \"&&\") {\n return !!a && !!b;\n }\n if (operator === \"XOR\") {\n return !!a === !b;\n }\n throw new Error(`unknown compare operator`);\n};\n\nexport const compareAgent: AgentFunction = async ({ namedInputs, params }) => {\n const ret = compare(namedInputs.array);\n if (params?.value) {\n return params?.value[ret ? \"true\" : \"false\"] ?? ret;\n }\n return ret;\n};\n\nconst compareAgentInfo: AgentFunctionInfo = {\n name: \"compareAgent\",\n agent: compareAgent,\n mock: compareAgent,\n inputs: {},\n output: {},\n samples: [\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"a\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abca\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"b\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abcd\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abc\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abcd\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"15\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">\", 15] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \">=\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 10\n inputs: { array: [\"10\", \">=\", \"19\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">=\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 19] },\n params: {},\n result: false,\n },\n //\n\n {\n inputs: { array: [\"10\", \"<\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<\", \"15\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<\", 15] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 20\n inputs: { array: [\"10\", \"<=\", \"19\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 19] },\n params: {},\n result: true,\n },\n\n {\n inputs: { array: [true, \"||\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"||\", false] },\n params: {},\n result: false,\n },\n\n {\n inputs: { array: [true, \"&&\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"&&\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [true, \"XOR\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"XOR\", true] },\n params: {},\n result: false,\n },\n //\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"||\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [[[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"bbb\", \"==\", \"bbb\"]], \"||\", [\"aaa\", \"&&\", \"bbb\"]] },\n params: {},\n result: true,\n },\n ],\n description: \"compare\",\n category: [\"compare\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default compareAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\n// https://platform.openai.com/docs/guides/vision\nconst getImageUrl = (data: string, imageType: string, detail?: string) => {\n if (imageType === \"http\") {\n return {\n url: data,\n };\n }\n const dataUrl = `data:image/${imageType};base64,${data}`;\n return {\n url: dataUrl,\n detail: detail ?? \"auto\",\n };\n};\n\ntype Content = { type: string; image_url: { url: string; detail?: string } } | { type: string; text: string };\n\nexport const images2messageAgent: AgentFunction<\n {\n imageType: string;\n detail?: string;\n },\n {\n message: {\n role: \"user\";\n content: Content[];\n };\n },\n {\n array: string[];\n prompt?: string;\n }\n> = async ({ namedInputs, params }) => {\n const { imageType, detail } = params;\n const { array, prompt } = namedInputs;\n arrayValidate(\"images2messageAgent\", namedInputs);\n assert(!!imageType, \"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...\");\n\n const contents: Content[] = array.map((base64ImageData) => {\n const image_url = getImageUrl(base64ImageData, imageType, detail);\n return {\n type: \"image_url\",\n image_url,\n };\n });\n\n if (prompt) {\n contents.unshift({ type: \"text\", text: prompt });\n }\n\n return {\n message: {\n role: \"user\",\n content: contents,\n },\n };\n};\n\nconst images2messageAgentInfo: AgentFunctionInfo = {\n name: \"images2messageAgent\",\n agent: images2messageAgent,\n mock: images2messageAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of base64 image data\",\n },\n prompt: {\n type: \"string\",\n description: \"prompt message\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [\"abcabc\", \"122123\"] },\n params: { imageType: \"png\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"abcabc\", \"122123\"], prompt: \"hello\" },\n params: { imageType: \"jpg\", detail: \"high\" },\n result: {\n message: {\n content: [\n {\n type: \"text\",\n text: \"hello\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"http://example.com/1.jpg\", \"http://example.com/2.jpg\"] },\n params: { imageType: \"http\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n url: \"http://example.com/1.jpg\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n url: \"http://example.com/2.jpg\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n ],\n description: \"Returns the message data for llm include image\",\n category: [\"image\"],\n author: \"Receptron team\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default images2messageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\n// Type for OpenAI's Embedding API\ninterface EmbeddingResponse {\n object: string;\n model: string;\n usage: {\n prompt_tokens: number;\n total_tokens: number;\n };\n data: [\n {\n object: string;\n index: number;\n embedding: number[];\n },\n ];\n}\n\nconst defaultEmbeddingModel = \"text-embedding-3-small\";\nconst OpenAI_embedding_API = \"https://api.openai.com/v1/embeddings\";\n\n// This agent retrieves embedding vectors for an array of strings using OpenAI's API\n//\n// Parameters:\n// model: Specifies the model (default is \"text-embedding-3-small\")\n// NamedInputs:\n// array: Array\n// item: string,\n// Result:\n// contents: Array>\n//\nexport const stringEmbeddingsAgent: AgentFunction<\n {\n model?: string;\n },\n number[][],\n { array: Array; item: string }\n> = async ({ params, namedInputs }) => {\n const { array, item } = namedInputs;\n\n const sources = array ?? [item];\n const apiKey = process.env.OPENAI_API_KEY;\n if (!apiKey) {\n throw new Error(\"OPENAI_API_KEY key is not set in environment variables.\");\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${apiKey}`,\n };\n\n const response = await fetch(OpenAI_embedding_API, {\n method: \"POST\",\n headers: headers,\n body: JSON.stringify({\n input: sources,\n model: params?.model ?? defaultEmbeddingModel,\n }),\n });\n const jsonResponse: EmbeddingResponse = await response.json();\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const embeddings = jsonResponse.data.map((object) => {\n return object.embedding;\n });\n return embeddings;\n};\n\nconst stringEmbeddingsAgentInfo: AgentFunctionInfo = {\n name: \"stringEmbeddingsAgent\",\n agent: stringEmbeddingsAgent,\n mock: stringEmbeddingsAgent,\n samples: [],\n description: \"Embeddings Agent\",\n category: [\"embedding\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringEmbeddingsAgentInfo;\n"],"names":["stringSplitterAgent","async","params","namedInputs","assert","source","text","chunkSize","overlap","Math","floor","count","length","contents","Array","fill","undefined","map","_","i","startIndex","substring","stringSplitterAgentInfo","name","agent","mock","inputs","type","properties","description","required","output","samples","result","category","author","repository","license","processTemplate","template","match","input","replace","isArray","item","isObject","Object","keys","reduce","tmp","key","stringTemplateAgent","console","warn","sampleNamedInput","message1","message2","stringTemplateAgentInfo","apple","lemon","row","version","nodes","ai","isResult","prompt","jsonParserAgent","data","JSON","stringify","parse","sample_object","json_str","md_json1","join","md_json2","md_json3","jsonParserAgentInfo","anyOf","stringCaseVariantsAgent","suffix","normalizedArray","trim","toLowerCase","split","push","normalized","lowerCamelCase","word","index","charAt","toUpperCase","slice","snakeCase","kebabCase","stringCaseVariantsAgentInfo","pushAgent","extra_message","arrayValidate","items","array","forEach","pushAgentInfo","banana","cacheType","popAgent","pop","popAgentInfo","array2","shiftAgent","shift","shiftAgentInfo","arrayFlatAgent","depth","flat","arrayFlatAgentInfo","arrayJoinAgent","separator","arrayJoinAgentInfo","dotProductAgent","matrix","vector","Error","vector0","dotProduct","value","dotProductAgentInfo","sortByValuesAgent","values","direction","assendant","sort","a","b","sortByValuesAgentInfo","echoAgent","filterParams","echoAgentInfo","countingAgent","list","countingAgentInfo","copyMessageAgent","messages","message","copyMessageAgentInfo","copy2ArrayAgent","isNamedInputs","copy2ArrayAgentInfo","mergeNodeIdAgent","debugInfo","nodeId","mergeNodeIdAgentInfo","test","streamMockAgent","token","streamTokenCallback","sleep","streamMockAgentInfo","stream","nestedAgent","context","forNestedGraph","graphData","log","agents","graphOptions","onLogCallback","taskManager","throwError","status","getStatus","concurrency","running","nestedGraphData","graphDataLatestVersion","nodeIds","graphAI","GraphAI","results","run","transactionLogs","error","onError","nestedAgentGenerator","nestedAgentInfo","graph","namedKey","mapAgent","rows","limit","resultAll","mappedNodeId","graphs","injectValue","runs","Promise","all","logs","mapIndex","compositeResult","mapAgentInfo","node2","fruit","verb","__mapIndex","totalAgent","innerInput","totalAgentInfo","c","d","dataSumTemplateAgent","dataSumTemplateAgentInfo","applyFilter","object","arrayInputs","include","exclude","alter","inject","swap","inspect","propIds","excludeSet","Set","propId","has","mapping","from","equal","notEqual","propertyFilterAgent","target","testInputs","color","model","maker","range","propertyFilterAgentInfo","red","blue","isTesla","isGM","copyAgent","copyAgentInfo","vanillaFetchAgent","url","method","queryParams","headers","body","url0","URL","headers0","URLSearchParams","search","toString","fetchOptions","Headers","debug","response","fetch","ok","json","vanillaFetchAgentInfo","quaryParams","foo","sleeperAgent","duration","sleeperAgentInfo","compare","_array","operator","Number","compareAgent","ret","compareAgentInfo","true","false","images2messageAgent","imageType","detail","base64ImageData","image_url","getImageUrl","unshift","role","content","images2messageAgentInfo","stringEmbeddingsAgent","sources","apiKey","process","env","OPENAI_API_KEY","Authorization","jsonResponse","embedding","stringEmbeddingsAgentInfo"],"mappings":"2KAUA,MAEaA,EAcTC,OAASC,SAAQC,kBACnBC,IAASD,EAAa,kDACtB,MAAME,EAASF,EAAYG,KACrBC,EAAYL,EAAOK,WAnBF,KAoBjBC,EAAUN,EAAOM,SAAWC,KAAKC,MAAMH,EAAY,GACnDI,EAAQF,KAAKC,MAAML,EAAOO,QAAUL,EAAYC,IAAY,EAMlE,MAAO,CAAEK,SALQ,IAAIC,MAAMH,GAAOI,UAAKC,GAAWC,KAAI,CAACC,EAAGC,KACxD,MAAMC,EAAaD,GAAKZ,EAAYC,GACpC,OAAOH,EAAOgB,UAAUD,EAAYA,EAAab,EAAU,IAG1CI,QAAOJ,YAAWC,UAAS,EA4B1Cc,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K,gCAEP1N,KAAM,cAGVkQ,KAAM,UAIZ,CACEnQ,OAAQ,CAAE0E,MAAO,CAAC,2BAA4B,6BAC9ClG,OAAQ,CAAEqR,UAAW,QACrBtP,OAAQ,CACN8G,QAAS,CACP+I,QAAS,CACP,CACEJ,UAAW,CACTrC,IAAK,4BAEP1N,KAAM,aAER,CACE+P,UAAW,CACTrC,IAAK,4BAEP1N,KAAM,cAGVkQ,KAAM,WAKdhQ,YAAa,iDACbK,SAAU,CAAC,SACXC,OAAQ,iBACRC,WAAY,uCACZC,QAAS,OCpIE2P,GAMT/R,OAASC,SAAQC,kBACnB,MAAMiG,MAAEA,EAAKxD,KAAEA,GAASzC,EAElB8R,EAAU7L,GAAS,CAACxD,GACpBsP,EAASC,QAAQC,IAAIC,eAC3B,IAAKH,EACH,MAAM,IAAIxK,MAAM,2DAElB,MAAM8H,EAAU,CACd,eAAgB,mBAChB8C,cAAe,UAAUJ,KAGrB/B,QAAiBC,MA/BI,uCA+BwB,CACjDd,OAAQ,OACRE,QAASA,EACTC,KAAMrL,KAAKC,UAAU,CACnB5B,MAAOwP,EACPvD,MAAOxO,GAAQwO,OArCS,6BAwCtB6D,QAAwCpC,EAASG,OAEvD,IAAKH,EAASE,GACZ,MAAM,IAAI3I,MAAM,uBAAuByI,EAAS1F,UAKlD,OAHmB8H,EAAapO,KAAKlD,KAAKoM,GACjCA,EAAOmF,WAEC,EAGbC,GAA+C,CACnDlR,KAAM,wBACNC,MAAOwQ,GACPvQ,KAAMuQ,GACNhQ,QAAS,GACTH,YAAa,mBACbK,SAAU,CAAC,aACXC,OAAQ,iBACRC,WAAY,uCACZC,QAAS"} \ No newline at end of file +{"version":3,"file":"bundle.esm.min.js","sources":["../src/string_agents/string_splitter_agent.ts","../src/string_agents/string_template_agent.ts","../src/string_agents/json_parser_agent.ts","../src/string_agents/string_case_variants_agent.ts","../src/graph_agents/nested_agent.ts","../src/string_agents/update_text_agent.ts","../src/array_agents/push_agent.ts","../src/array_agents/pop_agent.ts","../src/array_agents/shift_agent.ts","../src/array_agents/array_flat_agent.ts","../src/array_agents/array_join_agent.ts","../src/matrix_agents/dot_product_agent.ts","../src/matrix_agents/sort_by_values_agent.ts","../src/test_agents/echo_agent.ts","../src/test_agents/counting_agent.ts","../src/test_agents/copy_message_agent.ts","../src/test_agents/copy2array_agent.ts","../src/test_agents/merge_node_id_agent.ts","../src/test_agents/stream_mock_agent.ts","../src/graph_agents/map_agent.ts","../src/data_agents/total_agent.ts","../src/data_agents/data_sum_template_agent.ts","../src/data_agents/property_filter_agent.ts","../src/data_agents/copy_agent.ts","../src/service_agents/vanilla_fetch_agent.ts","../src/sleeper_agents/sleeper_agent.ts","../src/compare_agents/compare_agent.ts","../src/images_agents/image_to_message_agent.ts","../src/embedding_agent.ts"],"sourcesContent":["import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent strip one long string into chunks using following parameters\n//\n// chunkSize: number; // default is 2048\n// overlap: number; // default is 1/8th of chunkSize.\n//\n// see example\n// tests/agents/test_string_agent.ts\n//\nconst defaultChunkSize = 2048;\n\nexport const stringSplitterAgent: AgentFunction<\n {\n chunkSize?: number;\n overlap?: number;\n },\n {\n contents: Array;\n count: number;\n chunkSize: number;\n overlap: number;\n },\n {\n text: string;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"stringSplitterAgent: namedInputs is UNDEFINED!\");\n const source = namedInputs.text;\n const chunkSize = params.chunkSize ?? defaultChunkSize;\n const overlap = params.overlap ?? Math.floor(chunkSize / 8);\n const count = Math.floor(source.length / (chunkSize - overlap)) + 1;\n const contents = new Array(count).fill(undefined).map((_, i) => {\n const startIndex = i * (chunkSize - overlap);\n return source.substring(startIndex, startIndex + chunkSize);\n });\n\n return { contents, count, chunkSize, overlap };\n};\n\n// for test and document\nconst sampleInput = {\n text: \"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do.\",\n};\n\nconst sampleParams = { chunkSize: 64 };\nconst sampleResult = {\n contents: [\n \"Here's to the crazy ones, the misfits, the rebels, the troublema\",\n \"roublemakers, the round pegs in the square holes ... the ones wh\",\n \" ones who see things differently -- they're not fond of rules, a\",\n \"rules, and they have no respect for the status quo. ... You can \",\n \"You can quote them, disagree with them, glorify or vilify them, \",\n \"y them, but the only thing you can't do is ignore them because t\",\n \"ecause they change things. ... They push the human race forward,\",\n \"forward, and while some may see them as the crazy ones, we see g\",\n \"we see genius, because the people who are crazy enough to think \",\n \"o think that they can change the world, are the ones who do.\",\n \" do.\",\n ],\n count: 11,\n chunkSize: 64,\n overlap: 8,\n};\n\nconst stringSplitterAgentInfo: AgentFunctionInfo = {\n name: \"stringSplitterAgent\",\n agent: stringSplitterAgent,\n mock: stringSplitterAgent,\n inputs: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"text to be chuncked\",\n },\n },\n required: [\"text\"],\n },\n output: {\n type: \"object\",\n properties: {\n contents: {\n type: \"array\",\n description: \"the array of text chunks\",\n },\n count: {\n type: \"number\",\n description: \"the number of chunks\",\n },\n chunkSize: {\n type: \"number\",\n description: \"the chunk size\",\n },\n overlap: {\n type: \"number\",\n description: \"the overlap size\",\n },\n },\n },\n samples: [\n {\n inputs: sampleInput,\n params: sampleParams,\n result: sampleResult,\n },\n ],\n description: \"This agent strip one long string into chunks using following parameters\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringSplitterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, isObject } from \"graphai\";\n\ntype StringTemplate = string | Record;\ntype StringTemplateObject = StringTemplate | StringTemplate[] | Record;\n\nconst processTemplate: any = (template: StringTemplateObject, match: string, input: string) => {\n if (typeof template === \"string\") {\n if (template === match) {\n return input;\n }\n return template.replace(match, input);\n } else if (Array.isArray(template)) {\n return template.map((item: StringTemplate) => processTemplate(item, match, input));\n }\n\n if (isObject(template)) {\n return Object.keys(template).reduce((tmp: any, key: string) => {\n tmp[key] = processTemplate(template[key], match, input);\n return tmp;\n }, {});\n }\n return template;\n};\n\nexport const stringTemplateAgent: AgentFunction<\n {\n template: StringTemplateObject;\n },\n StringTemplateObject,\n Record\n> = async ({ params, namedInputs }) => {\n if (params.template === undefined) {\n if (namedInputs.text) {\n return namedInputs.text;\n }\n console.warn(\"warning: stringTemplateAgent no template\");\n }\n return Object.keys(namedInputs).reduce((template, key) => {\n return processTemplate(template, \"${\" + key + \"}\", namedInputs[key]);\n }, params.template);\n};\n\nconst sampleNamedInput = { message1: \"hello\", message2: \"test\" };\n\n// for test and document\nconst stringTemplateAgentInfo: AgentFunctionInfo = {\n name: \"stringTemplateAgent\",\n agent: stringTemplateAgent,\n mock: stringTemplateAgent,\n samples: [\n // named\n {\n inputs: sampleNamedInput,\n params: { template: \"${message1}: ${message2}\" },\n result: \"hello: test\",\n },\n {\n inputs: sampleNamedInput,\n params: { template: [\"${message1}: ${message2}\", \"${message2}: ${message1}\"] },\n result: [\"hello: test\", \"test: hello\"],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: \"${message2}\" } },\n result: { apple: \"hello\", lemon: \"test\" },\n },\n {\n inputs: sampleNamedInput,\n params: { template: [{ apple: \"${message1}\", lemon: \"${message2}\" }] },\n result: [{ apple: \"hello\", lemon: \"test\" }],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: [\"${message2}\"] } },\n result: { apple: \"hello\", lemon: [\"test\"] },\n },\n // graphData\n {\n inputs: { agent: \"openAiAgent\", row: \"hello world\", params: { text: \"message\" } },\n params: {\n template: {\n version: 0.5,\n nodes: {\n ai: {\n agent: \"${agent}\",\n isResult: true,\n params: \"${params}\",\n inputs: { prompt: \"${row}\" },\n },\n },\n },\n },\n result: {\n nodes: {\n ai: {\n agent: \"openAiAgent\",\n inputs: {\n prompt: \"hello world\",\n },\n isResult: true,\n params: { text: \"message\" },\n },\n },\n version: 0.5,\n },\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const jsonParserAgent: AgentFunction<\n null,\n unknown,\n {\n text: string;\n data: unknown;\n }\n> = async ({ namedInputs }) => {\n const { text, data } = namedInputs;\n\n if (data) {\n return JSON.stringify(data, null, 2);\n }\n const match = (\"\\n\" + text).match(/\\n```[a-zA-z]*([\\s\\S]*?)\\n```/);\n if (match) {\n return JSON.parse(match[1]);\n }\n return JSON.parse(text);\n};\n\nconst sample_object = { apple: \"red\", lemon: \"yellow\" };\n\nconst json_str = JSON.stringify(sample_object);\nconst md_json1 = [\"```\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json2 = [\"```json\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json3 = [\"```JSON\", json_str, \"```\"].join(\"\\n\");\n\nconst jsonParserAgentInfo: AgentFunctionInfo = {\n name: \"jsonParserAgent\",\n agent: jsonParserAgent,\n mock: jsonParserAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n type: \"string\",\n },\n samples: [\n {\n inputs: { data: sample_object },\n params: {},\n result: JSON.stringify(sample_object, null, 2),\n },\n {\n inputs: { text: JSON.stringify(sample_object, null, 2) },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json1 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json2 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json3 },\n params: {},\n result: sample_object,\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default jsonParserAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const stringCaseVariantsAgent: AgentFunction<\n { suffix?: string },\n { lowerCamelCase: string; snakeCase: string; kebabCase: string; normalized: string },\n { text: string }\n> = async ({ namedInputs, params }) => {\n const { suffix } = params;\n const normalizedArray = namedInputs.text\n .trim()\n .replace(/[\\s-_]+/g, \" \")\n .toLowerCase()\n .split(\" \");\n if (suffix && normalizedArray[normalizedArray.length - 1] !== suffix) {\n normalizedArray.push(suffix);\n }\n const normalized = normalizedArray.join(\" \");\n\n const lowerCamelCase = normalizedArray\n .map((word, index) => {\n if (index === 0) return word;\n return word.charAt(0).toUpperCase() + word.slice(1);\n })\n .join(\"\");\n\n const snakeCase = normalized.replace(/\\s+/g, \"_\");\n const kebabCase = normalized.replace(/\\s+/g, \"-\");\n\n return { lowerCamelCase, snakeCase, kebabCase, normalized };\n};\n\nconst stringCaseVariantsAgentInfo: AgentFunctionInfo = {\n name: \"stringCaseVariantsAgent\",\n agent: stringCaseVariantsAgent,\n mock: stringCaseVariantsAgent,\n samples: [\n {\n inputs: { text: \"this is a pen\" },\n params: {},\n result: {\n kebabCase: \"this-is-a-pen\",\n lowerCamelCase: \"thisIsAPen\",\n normalized: \"this is a pen\",\n snakeCase: \"this_is_a_pen\",\n },\n },\n {\n inputs: { text: \"string case variants\" },\n params: { suffix: \"agent\" },\n result: {\n kebabCase: \"string-case-variants-agent\",\n lowerCamelCase: \"stringCaseVariantsAgent\",\n normalized: \"string case variants agent\",\n snakeCase: \"string_case_variants_agent\",\n },\n },\n ],\n description: \"Format String Cases agent\",\n category: [\"string\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringCaseVariantsAgentInfo;\n","import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, StaticNodeData, GraphData } from \"graphai\";\nimport { GraphAI, assert, graphDataLatestVersion } from \"graphai\";\n\ntype NestedAgentGeneratorOption = {\n resultNodeId: string;\n};\nexport const nestedAgentGenerator: (graphData: GraphData, options?: NestedAgentGeneratorOption) => (context: AgentFunctionContext) => Promise = (\n graphData: GraphData,\n options?: NestedAgentGeneratorOption,\n) => {\n return async (context: AgentFunctionContext) => {\n const { namedInputs, log, debugInfo, params, forNestedGraph } = context;\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n const throwError = params.throwError ?? false;\n if (taskManager) {\n const status = taskManager.getStatus(false);\n assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`);\n }\n assert(!!graphData, \"nestedAgent: graph is required\");\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n if (nodeIds.length > 0) {\n nodeIds.forEach((nodeId) => {\n if (nestedGraphData.nodes[nodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] };\n } else {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n (nestedGraphData.nodes[nodeId] as StaticNodeData)[\"value\"] = namedInputs[nodeId];\n }\n });\n }\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n\n const results = await graphAI.run(false);\n log?.push(...graphAI.transactionLogs());\n\n if (options && options.resultNodeId) {\n return results[options.resultNodeId];\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n };\n};\n\nexport const nestedAgent: AgentFunction<{ throwError?: boolean }> = async (context) => {\n const { forNestedGraph } = context;\n const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } };\n assert(!!graphData, \"No GraphData\");\n\n return await nestedAgentGenerator(graphData)(context);\n};\n\nconst nestedAgentInfo: AgentFunctionInfo = {\n name: \"nestedAgent\",\n agent: nestedAgent,\n mock: nestedAgent,\n samples: [\n {\n inputs: {\n message: \"hello\",\n },\n params: {},\n result: {\n test: [\"hello\"],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"messages\" },\n inputs: { messages: [\":message\"] },\n isResult: true,\n },\n },\n },\n },\n ],\n description: \"nested Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default nestedAgentInfo;\n","import { nestedAgentGenerator } from \"@/generator\";\nimport { graphDataLatestVersion } from \"graphai\";\n\nconst updateTextGraph = {\n version: graphDataLatestVersion,\n nodes: {\n isNewText: {\n if: \":newText\",\n agent: \"copyAgent\",\n inputs: {\n text: \":newText\",\n },\n },\n isOldText: {\n unless: \":newText\",\n agent: \"copyAgent\",\n inputs: {\n text: \":oldText\",\n },\n },\n updatedText: {\n agent: \"copyAgent\",\n anyInput: true,\n inputs: {\n text: [\":isNewText.text\", \":isOldText.text\"],\n },\n },\n resultText: {\n isResult: true,\n agent: \"copyAgent\",\n anyInput: true,\n inputs: {\n text: \":updatedText.text.$0\",\n },\n },\n },\n};\n\nconst updateTextAgent = nestedAgentGenerator(updateTextGraph, { resultNodeId: \"resultText\" });\n\nconst updateTextAgentInfo = {\n name: \"updateTextAgent\",\n agent: updateTextAgent,\n mock: updateTextAgent,\n samples: [\n {\n inputs: { newText: \"new\", oldText: \"old\" },\n params: {},\n result: { text: \"new\" },\n },\n {\n inputs: { newText: \"\", oldText: \"old\" },\n params: {},\n result: { text: \"old\" },\n },\n ],\n description: \"\",\n category: [],\n author: \"\",\n repository: \"\",\n tools: [],\n license: \"\",\n hasGraphData: true,\n};\n\nexport default updateTextAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const pushAgent: AgentFunction }, { array: Array; item?: unknown; items: Array }> = async ({\n namedInputs,\n}) => {\n const extra_message = \" Set inputs: { array: :arrayNodeId, item: :itemNodeId }\";\n arrayValidate(\"pushAgent\", namedInputs, extra_message);\n const { item, items } = namedInputs;\n assert(!!(item || items), \"pushAgent: namedInputs.item is UNDEFINED!\" + extra_message);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n if (item) {\n array.push(item);\n } else {\n items.forEach((item) => {\n array.push(item);\n });\n }\n return {\n array,\n };\n};\n\nconst pushAgentInfo: AgentFunctionInfo = {\n name: \"pushAgent\",\n agent: pushAgent,\n mock: pushAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to push an item to\",\n },\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n items: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2], item: 3 },\n params: {},\n result: { array: [1, 2, 3] },\n },\n {\n inputs: { array: [{ apple: 1 }], item: { lemon: 2 } },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }] },\n },\n {\n inputs: { array: [{ apple: 1 }], items: [{ lemon: 2 }, { banana: 3 }] },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }, { banana: 3 }] },\n },\n ],\n description: \"push Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default pushAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const popAgent: AgentFunction; item: unknown }, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"popAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.pop();\n return { array, item };\n};\n\nconst popAgentInfo: AgentFunctionInfo = {\n name: \"popAgent\",\n agent: popAgent,\n mock: popAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to pop an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item popped from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"a\", \"b\"],\n item: \"c\",\n },\n },\n {\n inputs: {\n array: [1, 2, 3],\n array2: [\"a\", \"b\", \"c\"],\n },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n ],\n description: \"Pop Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default popAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const shiftAgent: AgentFunction, Record, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"shiftAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.shift();\n return { array, item };\n};\n\nconst shiftAgentInfo: AgentFunctionInfo = {\n name: \"shiftAgent\",\n agent: shiftAgent,\n mock: shiftAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to shift an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item shifted from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [2, 3],\n item: 1,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"b\", \"c\"],\n item: \"a\",\n },\n },\n ],\n description: \"shift Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default shiftAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayFlatAgent: AgentFunction<{ depth?: number }, { array: Array }, { array: Array }> = async ({ namedInputs, params }) => {\n arrayValidate(\"arrayFlatAgent\", namedInputs);\n const depth = params.depth ?? 1;\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n return { array: array.flat(depth) };\n};\n\nconst arrayFlatAgentInfo: AgentFunctionInfo = {\n name: \"arrayFlatAgent\",\n agent: arrayFlatAgent,\n mock: arrayFlatAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"flat array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n params: {\n type: \"object\",\n properties: {\n depth: {\n type: \"number\",\n description: \"array depth\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n array: [1, 2, [3]],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: { depth: 2 },\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n array: [\"a\", \"b\", \"c\"],\n },\n },\n ],\n description: \"Array Flat Agent\",\n category: [\"array\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n cacheType: \"pureAgent\",\n license: \"MIT\",\n};\nexport default arrayFlatAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayJoinAgent: AgentFunction<{ separator?: string; flat?: number }, { text: string }, { array: Array }> = async ({\n namedInputs,\n params,\n}) => {\n arrayValidate(\"arrayJoinAgent\", namedInputs);\n const separator = params.separator ?? \"\";\n const { flat } = params;\n\n const text = flat ? namedInputs.array.flat(flat).join(separator) : namedInputs.array.join(separator);\n return { text };\n};\n\nconst arrayJoinAgentInfo: AgentFunctionInfo = {\n name: \"arrayJoinAgent\",\n agent: arrayJoinAgent,\n mock: arrayJoinAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"array join\",\n },\n },\n required: [\"array\"],\n },\n params: {\n type: \"object\",\n properties: {\n separator: {\n type: \"string\",\n description: \"array join separator\",\n },\n flat: {\n type: \"number\",\n description: \"array flat depth\",\n },\n },\n },\n output: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"joined text\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n text: \"abc\",\n },\n },\n //\n {\n inputs: { array: [[1], [2], [3]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 2 },\n result: {\n text: \"1|2|3\",\n },\n },\n ],\n description: \"Array Join Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default arrayJoinAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent calculates the dot product of an array of vectors (A[]) and a vector (B),\n// typically used to calculate cosine similarity of embedding vectors.\n// Inputs:\n// matrix: Two dimentional array of numbers.\n// vector: One dimentional array of numbers.\n// Outputs:\n// { contents: Array } // array of docProduct of each vector (A[]) and vector B\nexport const dotProductAgent: AgentFunction, Array, { matrix: Array>; vector: Array }> = async ({\n namedInputs,\n}) => {\n assert(!!namedInputs, \"dotProductAgent: namedInputs is UNDEFINED!\");\n const matrix = namedInputs.matrix as Array>;\n const vector = namedInputs.vector as Array;\n if (matrix[0].length != vector.length) {\n throw new Error(`dotProduct: Length of vectors do not match. ${matrix[0].length}, ${vector.length}`);\n }\n const contents = matrix.map((vector0) => {\n return vector0.reduce((dotProduct: number, value, index) => {\n return dotProduct + value * vector[index];\n }, 0);\n });\n return contents;\n};\n\nconst dotProductAgentInfo: AgentFunctionInfo = {\n name: \"dotProductAgent\",\n agent: dotProductAgent,\n mock: dotProductAgent,\n inputs: {\n type: \"object\",\n properties: {\n matrix: {\n type: \"array\",\n description: \"two dimentional matrix\",\n items: {\n type: \"array\",\n items: {\n type: \"number\",\n },\n },\n },\n vector: {\n type: \"array\",\n description: \"the vector\",\n items: {\n type: \"number\",\n },\n },\n },\n required: [\"matrix\", \"vector\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n matrix: [\n [1, 2],\n [3, 4],\n [5, 6],\n ],\n vector: [3, 2],\n },\n params: {},\n result: [7, 17, 27],\n },\n {\n inputs: {\n matrix: [\n [1, 2],\n [2, 3],\n ],\n vector: [1, 2],\n },\n params: {},\n result: [5, 8],\n },\n ],\n description: \"dotProduct Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dotProductAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent returned a sorted array of one array (A) based on another array (B).\n// The default sorting order is \"decendant\".\n//\n// Parameters:\n// acendant: Specifies if the sorting order should be acendant. The default is \"false\" (decendant).\n// Inputs:\n// array: Array; // array to be sorted\n// values: Array; // array of numbers for sorting\n//\nexport const sortByValuesAgent: AgentFunction<\n {\n assendant?: boolean;\n },\n Array,\n {\n array: Array;\n values: Array;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"sortByValue: namedInputs is UNDEFINED!\");\n assert(!!namedInputs.array, \"sortByValue: namedInputs.array is UNDEFINED!\");\n assert(!!namedInputs.values, \"sortByValue: namedInputs.values is UNDEFINED!\");\n\n const direction = (params?.assendant ?? false) ? -1 : 1;\n const array: Array = namedInputs.array;\n const values: Array = namedInputs.values;\n const joined = array.map((item, index) => {\n return { item, value: values[index] };\n });\n const contents = joined\n .sort((a, b) => {\n return (b.value - a.value) * direction;\n })\n .map((a) => {\n return a.item;\n });\n return contents;\n};\n\nconst sortByValuesAgentInfo: AgentFunctionInfo = {\n name: \"sortByValuesAgent\",\n agent: sortByValuesAgent,\n mock: sortByValuesAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to sort\",\n },\n values: {\n type: \"array\",\n description: \"values associated with items in the array\",\n },\n },\n required: [\"array\", \"values\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {},\n result: [\"lemon\", \"orange\", \"apple\", \"banana\"],\n },\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {\n assendant: true,\n },\n result: [\"banana\", \"apple\", \"orange\", \"lemon\"],\n },\n ],\n description: \"sortByValues Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sortByValuesAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const echoAgent: AgentFunction = async ({ params, filterParams }) => {\n if (params.filterParams) {\n return filterParams;\n }\n return params;\n};\n\n// for test and document\nconst echoAgentInfo: AgentFunctionInfo = {\n name: \"echoAgent\",\n agent: echoAgent,\n mock: echoAgent,\n samples: [\n {\n inputs: {},\n params: { text: \"this is test\" },\n result: { text: \"this is test\" },\n },\n {\n inputs: {},\n params: {\n text: \"If you add filterParams option, it will respond to filterParams\",\n filterParams: true,\n },\n result: {},\n },\n ],\n description: \"Echo agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default echoAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const countingAgent: AgentFunction<{ count: number }, { list: number[] }> = async ({ params }) => {\n return {\n list: new Array(params.count).fill(undefined).map((_, i) => {\n return i;\n }),\n };\n};\n\n// for test and document\nconst countingAgentInfo: AgentFunctionInfo = {\n name: \"countingAgent\",\n agent: countingAgent,\n mock: countingAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4 },\n result: { list: [0, 1, 2, 3] },\n },\n ],\n description: \"Counting agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default countingAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const copyMessageAgent: AgentFunction<{ count: number; message: string }, { messages: string[] }> = async ({ params }) => {\n return {\n messages: new Array(params.count).fill(undefined).map(() => {\n return params.message;\n }),\n };\n};\n\n// for test and document\nconst copyMessageAgentInfo: AgentFunctionInfo = {\n name: \"copyMessageAgent\",\n agent: copyMessageAgent,\n mock: copyMessageAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4, message: \"hello\" },\n result: { messages: [\"hello\", \"hello\", \"hello\", \"hello\"] },\n },\n ],\n description: \"CopyMessage agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copyMessageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copy2ArrayAgent: AgentFunction<{ count: number }> = async ({ namedInputs, params }) => {\n assert(isNamedInputs(namedInputs), \"copy2ArrayAgent: namedInputs is UNDEFINED!\");\n const input = namedInputs.item ? namedInputs.item : namedInputs;\n return new Array(params.count).fill(undefined).map(() => {\n return input;\n });\n};\n\n// for test and document\nconst copy2ArrayAgentInfo: AgentFunctionInfo = {\n name: \"copy2ArrayAgent\",\n agent: copy2ArrayAgent,\n mock: copy2ArrayAgent,\n samples: [\n {\n inputs: { item: { message: \"hello\" } },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { message: \"hello\" },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { item: \"hello\" },\n params: { count: 10 },\n result: [\"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\"],\n },\n ],\n description: \"Copy2Array agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copy2ArrayAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const mergeNodeIdAgent: AgentFunction, { array: Record[] }> = async ({\n debugInfo: { nodeId },\n namedInputs,\n}) => {\n arrayValidate(\"mergeNodeIdAgent\", namedInputs);\n\n const dataSet = namedInputs.array;\n\n return dataSet.reduce(\n (tmp, input) => {\n return { ...tmp, ...input };\n },\n { [nodeId]: \"hello\" },\n );\n};\n\n// for test and document\nconst mergeNodeIdAgentInfo: AgentFunctionInfo = {\n name: \"mergeNodeIdAgent\",\n agent: mergeNodeIdAgent,\n mock: mergeNodeIdAgent,\n samples: [\n {\n inputs: { array: [{ message: \"hello\" }] },\n params: {},\n result: {\n message: \"hello\",\n test: \"hello\",\n },\n },\n ],\n description: \"merge node id agent\",\n category: [\"test\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default mergeNodeIdAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const streamMockAgent: AgentFunction = async ({ params, filterParams, namedInputs }) => {\n const message = params.message ?? namedInputs.message ?? \"\";\n\n for await (const token of message.split(\"\")) {\n if (filterParams.streamTokenCallback) {\n filterParams.streamTokenCallback(token);\n }\n await sleep(params.sleep || 100);\n }\n\n return { message };\n};\n\n// for test and document\nconst streamMockAgentInfo: AgentFunctionInfo = {\n name: \"streamMockAgent\",\n agent: streamMockAgent,\n mock: streamMockAgent,\n inputs: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n message: {\n type: \"string\",\n description: \"streaming message\",\n },\n },\n },\n {\n type: \"array\",\n },\n ],\n },\n samples: [\n {\n inputs: {},\n params: { message: \"this is params test\" },\n result: { message: \"this is params test\" },\n },\n {\n inputs: { message: \"this is named inputs test\" },\n params: {},\n result: { message: \"this is named inputs test\" },\n },\n ],\n description: \"Stream mock agent\",\n category: [\"test\"],\n author: \"Isamu Arimoto\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n stream: true,\n};\n\nexport default streamMockAgentInfo;\n","import { GraphAI, AgentFunction, AgentFunctionInfo, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const mapAgent: AgentFunction<\n {\n limit?: number;\n resultAll?: boolean;\n compositeResult?: boolean;\n throwError?: boolean;\n },\n Record\n> = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => {\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n\n if (taskManager) {\n const status = taskManager.getStatus();\n assert(status.concurrency > status.running, `mapAgent: Concurrency is too low: ${status.concurrency}`);\n }\n\n assert(!!namedInputs.rows, \"mapAgent: rows property is required in namedInput\");\n assert(!!graphData, \"mapAgent: graph is required\");\n\n const rows = namedInputs.rows.map((item: any) => item);\n if (params.limit && params.limit < rows.length) {\n rows.length = params.limit; // trim\n }\n const resultAll = params.resultAll ?? false;\n const throwError = params.throwError ?? false;\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n nestedGraphData.nodes[\"__mapIndex\"] = {};\n nodeIds.forEach((nodeId) => {\n const mappedNodeId = nodeId === \"rows\" ? \"row\" : nodeId;\n if (nestedGraphData.nodes[mappedNodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[mappedNodeId] = { value: namedInputs[nodeId] };\n } else if (!(\"agent\" in nestedGraphData.nodes[mappedNodeId])) {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n nestedGraphData.nodes[mappedNodeId][\"value\"] = namedInputs[nodeId];\n }\n });\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphs: Array = rows.map((row: any, index: number) => {\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n graphAI.injectValue(\"row\", row, \"__mapAgent_inputs__\");\n graphAI.injectValue(\"__mapIndex\", index, \"__mapAgent_inputs__\");\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n return graphAI;\n });\n\n const runs = graphs.map((graph) => {\n return graph.run(resultAll);\n });\n const results = await Promise.all(runs);\n const nodeIds = Object.keys(results[0]);\n // assert(nodeIds.length > 0, \"mapAgent: no return values (missing isResult)\");\n\n if (log) {\n const logs = graphs.map((graph, index) => {\n return graph.transactionLogs().map((log) => {\n log.mapIndex = index;\n return log;\n });\n });\n log.push(...logs.flat());\n }\n\n if (params.compositeResult) {\n const compositeResult = nodeIds.reduce((tmp: Record>, nodeId) => {\n tmp[nodeId] = results.map((result) => {\n return result[nodeId];\n });\n return tmp;\n }, {});\n return compositeResult;\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n};\n\nconst mapAgentInfo: AgentFunctionInfo = {\n name: \"mapAgent\",\n agent: mapAgent,\n mock: mapAgent,\n samples: [\n {\n inputs: {\n rows: [1, 2],\n },\n params: {},\n result: [{ test: [1] }, { test: [2] }],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${word}.\",\n },\n inputs: { word: \":row\" },\n isResult: true,\n },\n },\n },\n result: [\n { node2: \"I love apple.\" },\n { node2: \"I love orange.\" },\n { node2: \"I love banana.\" },\n { node2: \"I love lemon.\" },\n { node2: \"I love melon.\" },\n { node2: \"I love pineapple.\" },\n { node2: \"I love tomato.\" },\n ],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${item}.\",\n },\n inputs: { item: \":row.fruit\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"I love apple.\" }, { node2: \"I love orange.\" }],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n name: \"You\",\n verb: \"like\",\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"${name} ${verb} ${fruit}.\",\n },\n inputs: { fruit: \":row.fruit\", name: \":name\", verb: \":verb\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"You like apple.\" }, { node2: \"You like orange.\" }],\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n test: [1],\n row: 1,\n },\n {\n __mapIndex: 1,\n test: [2],\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n map: [\n {\n test: 1,\n },\n {\n test: 1,\n },\n ],\n row: 1,\n test: 1,\n },\n {\n __mapIndex: 1,\n map: [\n {\n test: 2,\n },\n {\n test: 2,\n },\n ],\n test: 2,\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n },\n },\n },\n },\n },\n },\n\n // old response\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${row}.\",\n },\n inputs: { row: \":row\" },\n isResult: true,\n },\n },\n },\n result: {\n node2: [\"I love apple.\", \"I love orange.\", \"I love banana.\", \"I love lemon.\", \"I love melon.\", \"I love pineapple.\", \"I love tomato.\"],\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n __mapIndex: [0, 1],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n __mapIndex: [0, 1],\n test: [[1], [2]],\n map: [\n {\n test: [[[1]], [[1]]],\n },\n {\n test: [[[2]], [[2]]],\n },\n ],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n },\n },\n },\n ],\n description: \"Map Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default mapAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const totalAgent: AgentFunction, Record, { array: Record[] }> = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((result, input) => {\n const inputArray = Array.isArray(input) ? input : [input];\n inputArray.forEach((innerInput) => {\n Object.keys(innerInput).forEach((key) => {\n const value = innerInput[key];\n if (result[key]) {\n result[key] += value;\n } else {\n result[key] = value;\n }\n });\n });\n return result;\n }, {});\n};\n\n//\nconst totalAgentInfo: AgentFunctionInfo = {\n name: \"totalAgent\",\n agent: totalAgent,\n mock: totalAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: { array: [[{ a: 1, b: -1 }, { c: 10 }], [{ a: 2, b: -1 }], [{ a: 3, b: -2 }, { d: -10 }]] },\n params: {},\n result: { a: 6, b: -4, c: 10, d: -10 },\n },\n {\n inputs: { array: [{ a: 1 }] },\n params: {},\n result: { a: 1 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }] },\n params: {},\n result: { a: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: {\n array: [\n { a: 1, b: 1 },\n { a: 2, b: 2 },\n { a: 3, b: 0 },\n ],\n },\n params: {},\n result: { a: 6, b: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2, b: 2 }, { a: 3, b: 0 }] },\n params: {},\n result: { a: 6, b: 2 },\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default totalAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const dataSumTemplateAgent: AgentFunction = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((tmp, input) => {\n return tmp + input;\n }, 0);\n};\n\nconst dataSumTemplateAgentInfo: AgentFunctionInfo = {\n name: \"dataSumTemplateAgent\",\n agent: dataSumTemplateAgent,\n mock: dataSumTemplateAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of numbers to calculate the sum of\",\n items: {\n type: \"integer\",\n },\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"number\",\n },\n samples: [\n {\n inputs: { array: [1] },\n params: {},\n result: 1,\n },\n {\n inputs: { array: [1, 2] },\n params: {},\n result: 3,\n },\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: 6,\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dataSumTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nconst applyFilter = (\n object: any,\n index: number,\n arrayInputs: any,\n include: Array | undefined,\n exclude: Array | undefined,\n alter: Record> | undefined,\n inject: Array> | undefined,\n swap: Record | undefined,\n inspect: Array> | undefined,\n) => {\n const propIds = include ? include : Object.keys(object);\n const excludeSet = new Set(exclude ?? []);\n const result = propIds.reduce((tmp: Record, propId) => {\n if (!excludeSet.has(propId)) {\n const mapping = alter && alter[propId];\n if (mapping && mapping[object[propId]]) {\n tmp[propId] = mapping[object[propId]];\n } else {\n tmp[propId] = object[propId];\n }\n }\n return tmp;\n }, {});\n\n if (inject) {\n inject.forEach((item) => {\n if (item.index === undefined || item.index === index) {\n result[item.propId] = arrayInputs[item.from];\n }\n });\n }\n if (inspect) {\n inspect.forEach((item) => {\n const value = arrayInputs[item.from ?? 1]; // default is arrayInputs[1]\n if (item.equal) {\n result[item.propId] = item.equal === value;\n } else if (item.notEqual) {\n result[item.propId] = item.notEqual !== value;\n }\n });\n }\n if (swap) {\n Object.keys(swap).forEach((key) => {\n const tmp = result[key];\n result[key] = result[swap[key]];\n result[swap[key]] = tmp;\n });\n }\n return result;\n};\n\nexport const propertyFilterAgent: AgentFunction<{\n include?: Array;\n exclude?: Array;\n alter?: Record>;\n inject?: Array>;\n inspect?: Array>;\n swap?: Record;\n}> = async ({ namedInputs, params }) => {\n const { include, exclude, alter, inject, swap, inspect } = params;\n const { array, item } = namedInputs;\n if (array) {\n // This is advanced usage, including \"inject\" and \"inspect\", which uses\n // array[1], array[2], ...\n const [target] = array; // Extract the first one\n if (Array.isArray(target)) {\n return target.map((item, index) => applyFilter(item, index, array, include, exclude, alter, inject, swap, inspect));\n }\n return applyFilter(target, 0, array, include, exclude, alter, inject, swap, inspect);\n } else if (item) {\n return applyFilter(item, 0, [], include, exclude, alter, inject, swap, inspect);\n }\n return false;\n};\n\nconst testInputs = {\n array: [\n [\n { color: \"red\", model: \"Model 3\", type: \"EV\", maker: \"Tesla\", range: 300 },\n { color: \"blue\", model: \"Model Y\", type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n \"Tesla Motors\",\n ],\n};\n\nconst propertyFilterAgentInfo: AgentFunctionInfo = {\n name: \"propertyFilterAgent\",\n agent: propertyFilterAgent,\n mock: propertyFilterAgent,\n inputs: {\n type: \"object\",\n },\n output: {\n type: \"any\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to apply filter\",\n },\n item: {\n type: \"object\",\n description: \"the object to apply filter\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [testInputs.array[0][0]] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: testInputs,\n params: { include: [\"color\", \"model\"] },\n result: [\n { color: \"red\", model: \"Model 3\" },\n { color: \"blue\", model: \"Model Y\" },\n ],\n },\n {\n inputs: testInputs,\n params: { exclude: [\"color\", \"model\"] },\n result: [\n { type: \"EV\", maker: \"Tesla\", range: 300 },\n { type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { exclude: [\"color\", \"model\"] },\n result: { type: \"EV\", maker: \"Tesla\", range: 300 },\n },\n {\n inputs: testInputs,\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: [\n {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n {\n color: \"red\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { swap: { maker: \"model\" } },\n result: [\n {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model Y\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { swap: { maker: \"model\" } },\n result: {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1, index: 0 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: {\n inspect: [\n { propId: \"isTesla\", equal: \"Tesla Motors\" }, // from: 1 is implied\n { propId: \"isGM\", notEqual: \"Tesla Motors\", from: 1 },\n ],\n },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n isTesla: true,\n isGM: false,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n isTesla: true,\n isGM: false,\n },\n ],\n },\n ],\n description: \"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default propertyFilterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copyAgent: AgentFunction<{\n namedKey?: string;\n}> = async ({ namedInputs, params }) => {\n const { namedKey } = params;\n assert(isNamedInputs(namedInputs), \"copyAgent: namedInputs is UNDEFINED!\");\n if (namedKey) {\n return namedInputs[namedKey];\n }\n return namedInputs;\n};\n\nconst copyAgentInfo: AgentFunctionInfo = {\n name: \"copyAgent\",\n agent: copyAgent,\n mock: copyAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n samples: [\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: {},\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { array: [\"Hello World\", \"Discarded\"] },\n params: {},\n result: { array: [\"Hello World\", \"Discarded\"] },\n },\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: { namedKey: \"color\" },\n result: \"red\",\n },\n ],\n description: \"Returns namedInputs\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default copyAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const vanillaFetchAgent: AgentFunction<{ debug?: boolean; type?: string; throwError?: boolean }, any, any> = async ({ namedInputs, params }) => {\n const { url, method, queryParams, headers, body } = namedInputs;\n const throwError = params.throwError ?? false;\n\n const url0 = new URL(url);\n const headers0 = headers ? { ...headers } : {};\n\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n url0.search = params.toString();\n }\n\n if (body) {\n headers0[\"Content-Type\"] = \"application/json\";\n }\n\n const fetchOptions: RequestInit = {\n method: (method ?? body) ? \"POST\" : \"GET\",\n headers: new Headers(headers0),\n body: body ? JSON.stringify(body) : undefined,\n };\n\n if (params?.debug) {\n return {\n url: url0.toString(),\n method: fetchOptions.method,\n headers: headers0,\n body: fetchOptions.body,\n };\n }\n\n const response = await fetch(url0.toString(), fetchOptions);\n\n if (!response.ok) {\n const status = response.status;\n const type = params?.type ?? \"json\";\n const error = type === \"json\" ? await response.json() : await response.text();\n if (throwError) {\n throw new Error(`HTTP error: ${status}`);\n }\n return {\n onError: {\n message: `HTTP error: ${status}`,\n status,\n error,\n },\n };\n }\n\n const result = await (async () => {\n const type = params?.type ?? \"json\";\n if (type === \"json\") {\n return await response.json();\n } else if (type === \"text\") {\n return response.text();\n }\n throw new Error(`Unknown Type! ${type}`);\n })();\n\n return result;\n};\n\nconst vanillaFetchAgentInfo: AgentFunctionInfo = {\n name: \"vanillaFetchAgent\",\n agent: vanillaFetchAgent,\n mock: vanillaFetchAgent,\n inputs: {\n type: \"object\",\n properties: {\n url: {\n type: \"string\",\n description: \"baseurl\",\n },\n method: {\n type: \"string\",\n description: \"HTTP method\",\n },\n headers: {\n type: \"object\",\n description: \"HTTP headers\",\n },\n quaryParams: {\n type: \"object\",\n description: \"Query parameters\",\n },\n body: {\n anyOf: [{ type: \"string\" }, { type: \"object\" }],\n description: \"body\",\n },\n },\n required: [\"url\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: { url: \"https://www.google.com\", queryParams: { foo: \"bar\" }, headers: { \"x-myHeader\": \"secret\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"GET\",\n url: \"https://www.google.com/?foo=bar\",\n headers: {\n \"x-myHeader\": \"secret\",\n },\n body: undefined,\n },\n },\n {\n inputs: { url: \"https://www.google.com\", body: { foo: \"bar\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"POST\",\n url: \"https://www.google.com/\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ foo: \"bar\" }),\n },\n },\n ],\n description: \"Retrieves JSON data from the specified URL\",\n category: [\"service\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default vanillaFetchAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const sleeperAgent: AgentFunction<{ duration?: number }> = async ({ params, namedInputs }) => {\n await sleep(params?.duration ?? 10);\n return namedInputs;\n};\n\nconst sleeperAgentInfo: AgentFunctionInfo = {\n name: \"sleeperAgent\",\n agent: sleeperAgent,\n mock: sleeperAgent,\n samples: [\n {\n inputs: {},\n params: { duration: 1 },\n result: {},\n },\n {\n inputs: { array: [{ a: 1 }, { b: 2 }] },\n params: { duration: 1 },\n result: {\n array: [{ a: 1 }, { b: 2 }],\n },\n },\n ],\n description: \"sleeper Agent\",\n category: [\"sleeper\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sleeperAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\ntype CompareDataItem = string | number | boolean | CompareData;\ntype CompareData = CompareDataItem[];\n\nconst compare = (_array: CompareData): boolean => {\n if (_array.length !== 3) {\n throw new Error(`compare inputs length must must be 3`);\n }\n const array = _array.map((value) => {\n if (Array.isArray(value)) {\n return compare(value);\n }\n return value;\n });\n const [a, operator, b] = array;\n if (operator === \"==\") {\n return a === b;\n }\n if (operator === \"!=\") {\n return a !== b;\n }\n if (operator === \">\") {\n return Number(a) > Number(b);\n }\n if (operator === \">=\") {\n return Number(a) >= Number(b);\n }\n if (operator === \"<\") {\n return Number(a) < Number(b);\n }\n if (operator === \"<=\") {\n return Number(a) <= Number(b);\n }\n if (operator === \"||\") {\n return !!a || !!b;\n }\n if (operator === \"&&\") {\n return !!a && !!b;\n }\n if (operator === \"XOR\") {\n return !!a === !b;\n }\n throw new Error(`unknown compare operator`);\n};\n\nexport const compareAgent: AgentFunction = async ({ namedInputs, params }) => {\n const ret = compare(namedInputs.array);\n if (params?.value) {\n return params?.value[ret ? \"true\" : \"false\"] ?? ret;\n }\n return ret;\n};\n\nconst compareAgentInfo: AgentFunctionInfo = {\n name: \"compareAgent\",\n agent: compareAgent,\n mock: compareAgent,\n inputs: {},\n output: {},\n samples: [\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"a\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abca\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"b\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abcd\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abc\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abcd\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"15\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">\", 15] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \">=\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 10\n inputs: { array: [\"10\", \">=\", \"19\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">=\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 19] },\n params: {},\n result: false,\n },\n //\n\n {\n inputs: { array: [\"10\", \"<\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<\", \"15\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<\", 15] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 20\n inputs: { array: [\"10\", \"<=\", \"19\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 19] },\n params: {},\n result: true,\n },\n\n {\n inputs: { array: [true, \"||\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"||\", false] },\n params: {},\n result: false,\n },\n\n {\n inputs: { array: [true, \"&&\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"&&\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [true, \"XOR\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"XOR\", true] },\n params: {},\n result: false,\n },\n //\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"||\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [[[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"bbb\", \"==\", \"bbb\"]], \"||\", [\"aaa\", \"&&\", \"bbb\"]] },\n params: {},\n result: true,\n },\n ],\n description: \"compare\",\n category: [\"compare\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default compareAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\n// https://platform.openai.com/docs/guides/vision\nconst getImageUrl = (data: string, imageType: string, detail?: string) => {\n if (imageType === \"http\") {\n return {\n url: data,\n };\n }\n const dataUrl = `data:image/${imageType};base64,${data}`;\n return {\n url: dataUrl,\n detail: detail ?? \"auto\",\n };\n};\n\ntype Content = { type: string; image_url: { url: string; detail?: string } } | { type: string; text: string };\n\nexport const images2messageAgent: AgentFunction<\n {\n imageType: string;\n detail?: string;\n },\n {\n message: {\n role: \"user\";\n content: Content[];\n };\n },\n {\n array: string[];\n prompt?: string;\n }\n> = async ({ namedInputs, params }) => {\n const { imageType, detail } = params;\n const { array, prompt } = namedInputs;\n arrayValidate(\"images2messageAgent\", namedInputs);\n assert(!!imageType, \"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...\");\n\n const contents: Content[] = array.map((base64ImageData) => {\n const image_url = getImageUrl(base64ImageData, imageType, detail);\n return {\n type: \"image_url\",\n image_url,\n };\n });\n\n if (prompt) {\n contents.unshift({ type: \"text\", text: prompt });\n }\n\n return {\n message: {\n role: \"user\",\n content: contents,\n },\n };\n};\n\nconst images2messageAgentInfo: AgentFunctionInfo = {\n name: \"images2messageAgent\",\n agent: images2messageAgent,\n mock: images2messageAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of base64 image data\",\n },\n prompt: {\n type: \"string\",\n description: \"prompt message\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [\"abcabc\", \"122123\"] },\n params: { imageType: \"png\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"abcabc\", \"122123\"], prompt: \"hello\" },\n params: { imageType: \"jpg\", detail: \"high\" },\n result: {\n message: {\n content: [\n {\n type: \"text\",\n text: \"hello\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"http://example.com/1.jpg\", \"http://example.com/2.jpg\"] },\n params: { imageType: \"http\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n url: \"http://example.com/1.jpg\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n url: \"http://example.com/2.jpg\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n ],\n description: \"Returns the message data for llm include image\",\n category: [\"image\"],\n author: \"Receptron team\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default images2messageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\n// Type for OpenAI's Embedding API\ninterface EmbeddingResponse {\n object: string;\n model: string;\n usage: {\n prompt_tokens: number;\n total_tokens: number;\n };\n data: [\n {\n object: string;\n index: number;\n embedding: number[];\n },\n ];\n}\n\nconst defaultEmbeddingModel = \"text-embedding-3-small\";\nconst OpenAI_embedding_API = \"https://api.openai.com/v1/embeddings\";\n\n// This agent retrieves embedding vectors for an array of strings using OpenAI's API\n//\n// Parameters:\n// model: Specifies the model (default is \"text-embedding-3-small\")\n// NamedInputs:\n// array: Array\n// item: string,\n// Result:\n// contents: Array>\n//\nexport const stringEmbeddingsAgent: AgentFunction<\n {\n model?: string;\n },\n number[][],\n { array: Array; item: string }\n> = async ({ params, namedInputs }) => {\n const { array, item } = namedInputs;\n\n const sources = array ?? [item];\n const apiKey = process.env.OPENAI_API_KEY;\n if (!apiKey) {\n throw new Error(\"OPENAI_API_KEY key is not set in environment variables.\");\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${apiKey}`,\n };\n\n const response = await fetch(OpenAI_embedding_API, {\n method: \"POST\",\n headers: headers,\n body: JSON.stringify({\n input: sources,\n model: params?.model ?? defaultEmbeddingModel,\n }),\n });\n const jsonResponse: EmbeddingResponse = await response.json();\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const embeddings = jsonResponse.data.map((object) => {\n return object.embedding;\n });\n return embeddings;\n};\n\nconst stringEmbeddingsAgentInfo: AgentFunctionInfo = {\n name: \"stringEmbeddingsAgent\",\n agent: stringEmbeddingsAgent,\n mock: stringEmbeddingsAgent,\n samples: [],\n description: \"Embeddings Agent\",\n category: [\"embedding\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringEmbeddingsAgentInfo;\n"],"names":["stringSplitterAgent","async","params","namedInputs","assert","source","text","chunkSize","overlap","Math","floor","count","length","contents","Array","fill","undefined","map","_","i","startIndex","substring","stringSplitterAgentInfo","name","agent","mock","inputs","type","properties","description","required","output","samples","result","category","author","repository","license","processTemplate","template","match","input","replace","isArray","item","isObject","Object","keys","reduce","tmp","key","stringTemplateAgent","console","warn","sampleNamedInput","message1","message2","stringTemplateAgentInfo","apple","lemon","row","version","nodes","ai","isResult","prompt","jsonParserAgent","data","JSON","stringify","parse","sample_object","json_str","md_json1","join","md_json2","md_json3","jsonParserAgentInfo","anyOf","stringCaseVariantsAgent","suffix","normalizedArray","trim","toLowerCase","split","push","normalized","lowerCamelCase","word","index","charAt","toUpperCase","slice","snakeCase","kebabCase","stringCaseVariantsAgentInfo","nestedAgentGenerator","graphData","options","context","log","debugInfo","forNestedGraph","agents","graphOptions","onLogCallback","taskManager","throwError","status","getStatus","concurrency","running","nestedGraphData","graphDataLatestVersion","nodeIds","forEach","nodeId","value","graphAI","GraphAI","results","run","transactionLogs","resultNodeId","error","Error","onError","message","nestedAgent","nestedAgentInfo","test","graph","namedKey","messages","updateTextAgent","isNewText","if","isOldText","unless","updatedText","anyInput","resultText","updateTextAgentInfo","newText","oldText","tools","hasGraphData","pushAgent","extra_message","arrayValidate","items","array","pushAgentInfo","banana","cacheType","popAgent","pop","popAgentInfo","array2","shiftAgent","shift","shiftAgentInfo","arrayFlatAgent","depth","flat","arrayFlatAgentInfo","arrayJoinAgent","separator","arrayJoinAgentInfo","dotProductAgent","matrix","vector","vector0","dotProduct","dotProductAgentInfo","sortByValuesAgent","values","direction","assendant","sort","a","b","sortByValuesAgentInfo","echoAgent","filterParams","echoAgentInfo","countingAgent","list","countingAgentInfo","copyMessageAgent","copyMessageAgentInfo","copy2ArrayAgent","isNamedInputs","copy2ArrayAgentInfo","mergeNodeIdAgent","mergeNodeIdAgentInfo","streamMockAgent","token","streamTokenCallback","sleep","streamMockAgentInfo","stream","mapAgent","rows","limit","resultAll","mappedNodeId","graphs","injectValue","runs","Promise","all","logs","mapIndex","compositeResult","mapAgentInfo","node2","fruit","verb","__mapIndex","totalAgent","innerInput","totalAgentInfo","c","d","dataSumTemplateAgent","dataSumTemplateAgentInfo","applyFilter","object","arrayInputs","include","exclude","alter","inject","swap","inspect","propIds","excludeSet","Set","propId","has","mapping","from","equal","notEqual","propertyFilterAgent","target","testInputs","color","model","maker","range","propertyFilterAgentInfo","red","blue","isTesla","isGM","copyAgent","copyAgentInfo","vanillaFetchAgent","url","method","queryParams","headers","body","url0","URL","headers0","URLSearchParams","search","toString","fetchOptions","Headers","debug","response","fetch","ok","json","vanillaFetchAgentInfo","quaryParams","foo","sleeperAgent","duration","sleeperAgentInfo","compare","_array","operator","Number","compareAgent","ret","compareAgentInfo","true","false","images2messageAgent","imageType","detail","base64ImageData","image_url","getImageUrl","unshift","role","content","images2messageAgentInfo","stringEmbeddingsAgent","sources","apiKey","process","env","OPENAI_API_KEY","Authorization","jsonResponse","embedding","stringEmbeddingsAgentInfo"],"mappings":"2KAUA,MAEaA,EAcTC,OAASC,SAAQC,kBACnBC,IAASD,EAAa,kDACtB,MAAME,EAASF,EAAYG,KACrBC,EAAYL,EAAOK,WAnBF,KAoBjBC,EAAUN,EAAOM,SAAWC,KAAKC,MAAMH,EAAY,GACnDI,EAAQF,KAAKC,MAAML,EAAOO,QAAUL,EAAYC,IAAY,EAMlE,MAAO,CAAEK,SALQ,IAAIC,M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AA4B,6BAC9CrJ,OAAQ,CAAEoS,UAAW,QACrBrQ,OAAQ,CACN8F,QAAS,CACP8K,QAAS,CACP,CACEJ,UAAW,CACTrC,IAAK,4BAEPzO,KAAM,aAER,CACE8Q,UAAW,CACTrC,IAAK,4BAEPzO,KAAM,cAGViR,KAAM,WAKd/Q,YAAa,iDACbK,SAAU,CAAC,SACXC,OAAQ,iBACRC,WAAY,uCACZC,QAAS,OCpIE0Q,GAMT9S,OAASC,SAAQC,kBACnB,MAAMoJ,MAAEA,EAAK3G,KAAEA,GAASzC,EAElB6S,EAAUzJ,GAAS,CAAC3G,GACpBqQ,EAASC,QAAQC,IAAIC,eAC3B,IAAKH,EACH,MAAM,IAAIpL,MAAM,2DAElB,MAAM0I,EAAU,CACd,eAAgB,mBAChB8C,cAAe,UAAUJ,KAGrB/B,QAAiBC,MA/BI,uCA+BwB,CACjDd,OAAQ,OACRE,QAASA,EACTC,KAAMpM,KAAKC,UAAU,CACnB5B,MAAOuQ,EACPvD,MAAOvP,GAAQuP,OArCS,6BAwCtB6D,QAAwCpC,EAASG,OAEvD,IAAKH,EAASE,GACZ,MAAM,IAAIvJ,MAAM,uBAAuBqJ,EAAStK,UAKlD,OAHmB0M,EAAanP,KAAKlD,KAAKmN,GACjCA,EAAOmF,WAEC,EAGbC,GAA+C,CACnDjS,KAAM,wBACNC,MAAOuR,GACPtR,KAAMsR,GACN/Q,QAAS,GACTH,YAAa,mBACbK,SAAU,CAAC,aACXC,OAAQ,iBACRC,WAAY,uCACZC,QAAS"} \ No newline at end of file diff --git a/agents/vanilla_agents/lib/bundle.umd.js b/agents/vanilla_agents/lib/bundle.umd.js index f5e1e54a..540e454c 100644 --- a/agents/vanilla_agents/lib/bundle.umd.js +++ b/agents/vanilla_agents/lib/bundle.umd.js @@ -312,6 +312,160 @@ license: "MIT", }; + const nestedAgentGenerator = (graphData, options) => { + return async (context) => { + const { namedInputs, log, debugInfo, params, forNestedGraph } = context; + graphai.assert(!!forNestedGraph, "Please update graphai to 0.5.19 or higher"); + const { agents, graphOptions, onLogCallback } = forNestedGraph; + const { taskManager } = graphOptions; + const throwError = params.throwError ?? false; + if (taskManager) { + const status = taskManager.getStatus(false); + graphai.assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`); + } + graphai.assert(!!graphData, "nestedAgent: graph is required"); + const { nodes } = graphData; + const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphai.graphDataLatestVersion }; // deep enough copy + const nodeIds = Object.keys(namedInputs); + if (nodeIds.length > 0) { + nodeIds.forEach((nodeId) => { + if (nestedGraphData.nodes[nodeId] === undefined) { + // If the input node does not exist, automatically create a static node + nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] }; + } + else { + // Otherwise, inject the proper data here (instead of calling injectTo method later) + nestedGraphData.nodes[nodeId]["value"] = namedInputs[nodeId]; + } + }); + } + try { + if (nestedGraphData.version === undefined && debugInfo.version) { + nestedGraphData.version = debugInfo.version; + } + const graphAI = new graphai.GraphAI(nestedGraphData, agents || {}, graphOptions); + // for backward compatibility. Remove 'if' later + if (onLogCallback) { + graphAI.onLogCallback = onLogCallback; + } + const results = await graphAI.run(false); + log?.push(...graphAI.transactionLogs()); + if (options && options.resultNodeId) { + return results[options.resultNodeId]; + } + return results; + } + catch (error) { + if (error instanceof Error && !throwError) { + return { + onError: { + message: error.message, + error, + }, + }; + } + throw error; + } + }; + }; + const nestedAgent = async (context) => { + const { forNestedGraph } = context; + const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } }; + graphai.assert(!!graphData, "No GraphData"); + return await nestedAgentGenerator(graphData)(context); + }; + const nestedAgentInfo = { + name: "nestedAgent", + agent: nestedAgent, + mock: nestedAgent, + samples: [ + { + inputs: { + message: "hello", + }, + params: {}, + result: { + test: ["hello"], + }, + graph: { + nodes: { + test: { + agent: "copyAgent", + params: { namedKey: "messages" }, + inputs: { messages: [":message"] }, + isResult: true, + }, + }, + }, + }, + ], + description: "nested Agent", + category: ["graph"], + author: "Receptron team", + repository: "https://github.com/receptron/graphai", + license: "MIT", + }; + + const updateTextGraph = { + version: graphai.graphDataLatestVersion, + nodes: { + isNewText: { + if: ":newText", + agent: "copyAgent", + inputs: { + text: ":newText", + }, + }, + isOldText: { + unless: ":newText", + agent: "copyAgent", + inputs: { + text: ":oldText", + }, + }, + updatedText: { + agent: "copyAgent", + anyInput: true, + inputs: { + text: [":isNewText.text", ":isOldText.text"], + }, + }, + resultText: { + isResult: true, + agent: "copyAgent", + anyInput: true, + inputs: { + text: ":updatedText.text.$0", + }, + }, + }, + }; + const updateTextAgent = nestedAgentGenerator(updateTextGraph, { resultNodeId: "resultText" }); + const updateTextAgentInfo = { + name: "updateTextAgent", + agent: updateTextAgent, + mock: updateTextAgent, + samples: [ + { + inputs: { newText: "new", oldText: "old" }, + params: {}, + result: { text: "new" }, + }, + { + inputs: { newText: "", oldText: "old" }, + params: {}, + result: { text: "old" }, + }, + ], + description: "", + category: [], + author: "", + repository: "", + tools: [], + license: "", + hasGraphData: true, + }; + const pushAgent = async ({ namedInputs, }) => { const extra_message = " Set inputs: { array: :arrayNodeId, item: :itemNodeId }"; agent_utils.arrayValidate("pushAgent", namedInputs, extra_message); @@ -1086,97 +1240,6 @@ stream: true, }; - const nestedAgentGenerator = (graphData) => { - return async (context) => { - const { namedInputs, log, debugInfo, params, forNestedGraph } = context; - graphai.assert(!!forNestedGraph, "Please update graphai to 0.5.19 or higher"); - const { agents, graphOptions, onLogCallback } = forNestedGraph; - const { taskManager } = graphOptions; - const throwError = params.throwError ?? false; - if (taskManager) { - const status = taskManager.getStatus(false); - graphai.assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`); - } - graphai.assert(!!graphData, "nestedAgent: graph is required"); - const { nodes } = graphData; - const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphai.graphDataLatestVersion }; // deep enough copy - const nodeIds = Object.keys(namedInputs); - if (nodeIds.length > 0) { - nodeIds.forEach((nodeId) => { - if (nestedGraphData.nodes[nodeId] === undefined) { - // If the input node does not exist, automatically create a static node - nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] }; - } - else { - // Otherwise, inject the proper data here (instead of calling injectTo method later) - nestedGraphData.nodes[nodeId]["value"] = namedInputs[nodeId]; - } - }); - } - try { - if (nestedGraphData.version === undefined && debugInfo.version) { - nestedGraphData.version = debugInfo.version; - } - const graphAI = new graphai.GraphAI(nestedGraphData, agents || {}, graphOptions); - // for backward compatibility. Remove 'if' later - if (onLogCallback) { - graphAI.onLogCallback = onLogCallback; - } - const results = await graphAI.run(false); - log?.push(...graphAI.transactionLogs()); - return results; - } - catch (error) { - if (error instanceof Error && !throwError) { - return { - onError: { - message: error.message, - error, - }, - }; - } - throw error; - } - }; - }; - const nestedAgent = async (context) => { - const { forNestedGraph } = context; - const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } }; - graphai.assert(!!graphData, "No GraphData"); - return await nestedAgentGenerator(graphData)(context); - }; - const nestedAgentInfo = { - name: "nestedAgent", - agent: nestedAgent, - mock: nestedAgent, - samples: [ - { - inputs: { - message: "hello", - }, - params: {}, - result: { - test: ["hello"], - }, - graph: { - nodes: { - test: { - agent: "copyAgent", - params: { namedKey: "messages" }, - inputs: { messages: [":message"] }, - isResult: true, - }, - }, - }, - }, - ], - description: "nested Agent", - category: ["graph"], - author: "Receptron team", - repository: "https://github.com/receptron/graphai", - license: "MIT", - }; - const mapAgent = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => { graphai.assert(!!forNestedGraph, "Please update graphai to 0.5.19 or higher"); const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph; @@ -2624,6 +2687,7 @@ exports.stringSplitterAgent = stringSplitterAgentInfo; exports.stringTemplateAgent = stringTemplateAgentInfo; exports.totalAgent = totalAgentInfo; + exports.updateTextAgent = updateTextAgentInfo; exports.vanillaFetchAgent = vanillaFetchAgentInfo; })); diff --git a/agents/vanilla_agents/lib/bundle.umd.js.map b/agents/vanilla_agents/lib/bundle.umd.js.map index 07347774..33a4f30f 100644 --- a/agents/vanilla_agents/lib/bundle.umd.js.map +++ b/agents/vanilla_agents/lib/bundle.umd.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.umd.js","sources":["../src/string_agents/string_splitter_agent.ts","../src/string_agents/string_template_agent.ts","../src/string_agents/json_parser_agent.ts","../src/string_agents/string_case_variants_agent.ts","../src/array_agents/push_agent.ts","../src/array_agents/pop_agent.ts","../src/array_agents/shift_agent.ts","../src/array_agents/array_flat_agent.ts","../src/array_agents/array_join_agent.ts","../src/matrix_agents/dot_product_agent.ts","../src/matrix_agents/sort_by_values_agent.ts","../src/test_agents/echo_agent.ts","../src/test_agents/counting_agent.ts","../src/test_agents/copy_message_agent.ts","../src/test_agents/copy2array_agent.ts","../src/test_agents/merge_node_id_agent.ts","../src/test_agents/stream_mock_agent.ts","../src/graph_agents/nested_agent.ts","../src/graph_agents/map_agent.ts","../src/data_agents/total_agent.ts","../src/data_agents/data_sum_template_agent.ts","../src/data_agents/property_filter_agent.ts","../src/data_agents/copy_agent.ts","../src/service_agents/vanilla_fetch_agent.ts","../src/sleeper_agents/sleeper_agent.ts","../src/compare_agents/compare_agent.ts","../src/images_agents/image_to_message_agent.ts","../src/embedding_agent.ts"],"sourcesContent":["import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent strip one long string into chunks using following parameters\n//\n// chunkSize: number; // default is 2048\n// overlap: number; // default is 1/8th of chunkSize.\n//\n// see example\n// tests/agents/test_string_agent.ts\n//\nconst defaultChunkSize = 2048;\n\nexport const stringSplitterAgent: AgentFunction<\n {\n chunkSize?: number;\n overlap?: number;\n },\n {\n contents: Array;\n count: number;\n chunkSize: number;\n overlap: number;\n },\n {\n text: string;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"stringSplitterAgent: namedInputs is UNDEFINED!\");\n const source = namedInputs.text;\n const chunkSize = params.chunkSize ?? defaultChunkSize;\n const overlap = params.overlap ?? Math.floor(chunkSize / 8);\n const count = Math.floor(source.length / (chunkSize - overlap)) + 1;\n const contents = new Array(count).fill(undefined).map((_, i) => {\n const startIndex = i * (chunkSize - overlap);\n return source.substring(startIndex, startIndex + chunkSize);\n });\n\n return { contents, count, chunkSize, overlap };\n};\n\n// for test and document\nconst sampleInput = {\n text: \"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do.\",\n};\n\nconst sampleParams = { chunkSize: 64 };\nconst sampleResult = {\n contents: [\n \"Here's to the crazy ones, the misfits, the rebels, the troublema\",\n \"roublemakers, the round pegs in the square holes ... the ones wh\",\n \" ones who see things differently -- they're not fond of rules, a\",\n \"rules, and they have no respect for the status quo. ... You can \",\n \"You can quote them, disagree with them, glorify or vilify them, \",\n \"y them, but the only thing you can't do is ignore them because t\",\n \"ecause they change things. ... They push the human race forward,\",\n \"forward, and while some may see them as the crazy ones, we see g\",\n \"we see genius, because the people who are crazy enough to think \",\n \"o think that they can change the world, are the ones who do.\",\n \" do.\",\n ],\n count: 11,\n chunkSize: 64,\n overlap: 8,\n};\n\nconst stringSplitterAgentInfo: AgentFunctionInfo = {\n name: \"stringSplitterAgent\",\n agent: stringSplitterAgent,\n mock: stringSplitterAgent,\n inputs: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"text to be chuncked\",\n },\n },\n required: [\"text\"],\n },\n output: {\n type: \"object\",\n properties: {\n contents: {\n type: \"array\",\n description: \"the array of text chunks\",\n },\n count: {\n type: \"number\",\n description: \"the number of chunks\",\n },\n chunkSize: {\n type: \"number\",\n description: \"the chunk size\",\n },\n overlap: {\n type: \"number\",\n description: \"the overlap size\",\n },\n },\n },\n samples: [\n {\n inputs: sampleInput,\n params: sampleParams,\n result: sampleResult,\n },\n ],\n description: \"This agent strip one long string into chunks using following parameters\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringSplitterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, isObject } from \"graphai\";\n\ntype StringTemplate = string | Record;\ntype StringTemplateObject = StringTemplate | StringTemplate[] | Record;\n\nconst processTemplate: any = (template: StringTemplateObject, match: string, input: string) => {\n if (typeof template === \"string\") {\n if (template === match) {\n return input;\n }\n return template.replace(match, input);\n } else if (Array.isArray(template)) {\n return template.map((item: StringTemplate) => processTemplate(item, match, input));\n }\n\n if (isObject(template)) {\n return Object.keys(template).reduce((tmp: any, key: string) => {\n tmp[key] = processTemplate(template[key], match, input);\n return tmp;\n }, {});\n }\n return template;\n};\n\nexport const stringTemplateAgent: AgentFunction<\n {\n template: StringTemplateObject;\n },\n StringTemplateObject,\n Record\n> = async ({ params, namedInputs }) => {\n if (params.template === undefined) {\n if (namedInputs.text) {\n return namedInputs.text;\n }\n console.warn(\"warning: stringTemplateAgent no template\");\n }\n return Object.keys(namedInputs).reduce((template, key) => {\n return processTemplate(template, \"${\" + key + \"}\", namedInputs[key]);\n }, params.template);\n};\n\nconst sampleNamedInput = { message1: \"hello\", message2: \"test\" };\n\n// for test and document\nconst stringTemplateAgentInfo: AgentFunctionInfo = {\n name: \"stringTemplateAgent\",\n agent: stringTemplateAgent,\n mock: stringTemplateAgent,\n samples: [\n // named\n {\n inputs: sampleNamedInput,\n params: { template: \"${message1}: ${message2}\" },\n result: \"hello: test\",\n },\n {\n inputs: sampleNamedInput,\n params: { template: [\"${message1}: ${message2}\", \"${message2}: ${message1}\"] },\n result: [\"hello: test\", \"test: hello\"],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: \"${message2}\" } },\n result: { apple: \"hello\", lemon: \"test\" },\n },\n {\n inputs: sampleNamedInput,\n params: { template: [{ apple: \"${message1}\", lemon: \"${message2}\" }] },\n result: [{ apple: \"hello\", lemon: \"test\" }],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: [\"${message2}\"] } },\n result: { apple: \"hello\", lemon: [\"test\"] },\n },\n // graphData\n {\n inputs: { agent: \"openAiAgent\", row: \"hello world\", params: { text: \"message\" } },\n params: {\n template: {\n version: 0.5,\n nodes: {\n ai: {\n agent: \"${agent}\",\n isResult: true,\n params: \"${params}\",\n inputs: { prompt: \"${row}\" },\n },\n },\n },\n },\n result: {\n nodes: {\n ai: {\n agent: \"openAiAgent\",\n inputs: {\n prompt: \"hello world\",\n },\n isResult: true,\n params: { text: \"message\" },\n },\n },\n version: 0.5,\n },\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const jsonParserAgent: AgentFunction<\n null,\n unknown,\n {\n text: string;\n data: unknown;\n }\n> = async ({ namedInputs }) => {\n const { text, data } = namedInputs;\n\n if (data) {\n return JSON.stringify(data, null, 2);\n }\n const match = (\"\\n\" + text).match(/\\n```[a-zA-z]*([\\s\\S]*?)\\n```/);\n if (match) {\n return JSON.parse(match[1]);\n }\n return JSON.parse(text);\n};\n\nconst sample_object = { apple: \"red\", lemon: \"yellow\" };\n\nconst json_str = JSON.stringify(sample_object);\nconst md_json1 = [\"```\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json2 = [\"```json\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json3 = [\"```JSON\", json_str, \"```\"].join(\"\\n\");\n\nconst jsonParserAgentInfo: AgentFunctionInfo = {\n name: \"jsonParserAgent\",\n agent: jsonParserAgent,\n mock: jsonParserAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n type: \"string\",\n },\n samples: [\n {\n inputs: { data: sample_object },\n params: {},\n result: JSON.stringify(sample_object, null, 2),\n },\n {\n inputs: { text: JSON.stringify(sample_object, null, 2) },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json1 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json2 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json3 },\n params: {},\n result: sample_object,\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default jsonParserAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const stringCaseVariantsAgent: AgentFunction<\n { suffix?: string },\n { lowerCamelCase: string; snakeCase: string; kebabCase: string; normalized: string },\n { text: string }\n> = async ({ namedInputs, params }) => {\n const { suffix } = params;\n const normalizedArray = namedInputs.text\n .trim()\n .replace(/[\\s-_]+/g, \" \")\n .toLowerCase()\n .split(\" \");\n if (suffix && normalizedArray[normalizedArray.length - 1] !== suffix) {\n normalizedArray.push(suffix);\n }\n const normalized = normalizedArray.join(\" \");\n\n const lowerCamelCase = normalizedArray\n .map((word, index) => {\n if (index === 0) return word;\n return word.charAt(0).toUpperCase() + word.slice(1);\n })\n .join(\"\");\n\n const snakeCase = normalized.replace(/\\s+/g, \"_\");\n const kebabCase = normalized.replace(/\\s+/g, \"-\");\n\n return { lowerCamelCase, snakeCase, kebabCase, normalized };\n};\n\nconst stringCaseVariantsAgentInfo: AgentFunctionInfo = {\n name: \"stringCaseVariantsAgent\",\n agent: stringCaseVariantsAgent,\n mock: stringCaseVariantsAgent,\n samples: [\n {\n inputs: { text: \"this is a pen\" },\n params: {},\n result: {\n kebabCase: \"this-is-a-pen\",\n lowerCamelCase: \"thisIsAPen\",\n normalized: \"this is a pen\",\n snakeCase: \"this_is_a_pen\",\n },\n },\n {\n inputs: { text: \"string case variants\" },\n params: { suffix: \"agent\" },\n result: {\n kebabCase: \"string-case-variants-agent\",\n lowerCamelCase: \"stringCaseVariantsAgent\",\n normalized: \"string case variants agent\",\n snakeCase: \"string_case_variants_agent\",\n },\n },\n ],\n description: \"Format String Cases agent\",\n category: [\"string\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringCaseVariantsAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const pushAgent: AgentFunction }, { array: Array; item?: unknown; items: Array }> = async ({\n namedInputs,\n}) => {\n const extra_message = \" Set inputs: { array: :arrayNodeId, item: :itemNodeId }\";\n arrayValidate(\"pushAgent\", namedInputs, extra_message);\n const { item, items } = namedInputs;\n assert(!!(item || items), \"pushAgent: namedInputs.item is UNDEFINED!\" + extra_message);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n if (item) {\n array.push(item);\n } else {\n items.forEach((item) => {\n array.push(item);\n });\n }\n return {\n array,\n };\n};\n\nconst pushAgentInfo: AgentFunctionInfo = {\n name: \"pushAgent\",\n agent: pushAgent,\n mock: pushAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to push an item to\",\n },\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n items: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2], item: 3 },\n params: {},\n result: { array: [1, 2, 3] },\n },\n {\n inputs: { array: [{ apple: 1 }], item: { lemon: 2 } },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }] },\n },\n {\n inputs: { array: [{ apple: 1 }], items: [{ lemon: 2 }, { banana: 3 }] },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }, { banana: 3 }] },\n },\n ],\n description: \"push Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default pushAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const popAgent: AgentFunction; item: unknown }, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"popAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.pop();\n return { array, item };\n};\n\nconst popAgentInfo: AgentFunctionInfo = {\n name: \"popAgent\",\n agent: popAgent,\n mock: popAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to pop an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item popped from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"a\", \"b\"],\n item: \"c\",\n },\n },\n {\n inputs: {\n array: [1, 2, 3],\n array2: [\"a\", \"b\", \"c\"],\n },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n ],\n description: \"Pop Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default popAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const shiftAgent: AgentFunction, Record, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"shiftAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.shift();\n return { array, item };\n};\n\nconst shiftAgentInfo: AgentFunctionInfo = {\n name: \"shiftAgent\",\n agent: shiftAgent,\n mock: shiftAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to shift an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item shifted from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [2, 3],\n item: 1,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"b\", \"c\"],\n item: \"a\",\n },\n },\n ],\n description: \"shift Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default shiftAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayFlatAgent: AgentFunction<{ depth?: number }, { array: Array }, { array: Array }> = async ({ namedInputs, params }) => {\n arrayValidate(\"arrayFlatAgent\", namedInputs);\n const depth = params.depth ?? 1;\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n return { array: array.flat(depth) };\n};\n\nconst arrayFlatAgentInfo: AgentFunctionInfo = {\n name: \"arrayFlatAgent\",\n agent: arrayFlatAgent,\n mock: arrayFlatAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"flat array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n params: {\n type: \"object\",\n properties: {\n depth: {\n type: \"number\",\n description: \"array depth\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n array: [1, 2, [3]],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: { depth: 2 },\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n array: [\"a\", \"b\", \"c\"],\n },\n },\n ],\n description: \"Array Flat Agent\",\n category: [\"array\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n cacheType: \"pureAgent\",\n license: \"MIT\",\n};\nexport default arrayFlatAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayJoinAgent: AgentFunction<{ separator?: string; flat?: number }, { text: string }, { array: Array }> = async ({\n namedInputs,\n params,\n}) => {\n arrayValidate(\"arrayJoinAgent\", namedInputs);\n const separator = params.separator ?? \"\";\n const { flat } = params;\n\n const text = flat ? namedInputs.array.flat(flat).join(separator) : namedInputs.array.join(separator);\n return { text };\n};\n\nconst arrayJoinAgentInfo: AgentFunctionInfo = {\n name: \"arrayJoinAgent\",\n agent: arrayJoinAgent,\n mock: arrayJoinAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"array join\",\n },\n },\n required: [\"array\"],\n },\n params: {\n type: \"object\",\n properties: {\n separator: {\n type: \"string\",\n description: \"array join separator\",\n },\n flat: {\n type: \"number\",\n description: \"array flat depth\",\n },\n },\n },\n output: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"joined text\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n text: \"abc\",\n },\n },\n //\n {\n inputs: { array: [[1], [2], [3]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 2 },\n result: {\n text: \"1|2|3\",\n },\n },\n ],\n description: \"Array Join Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default arrayJoinAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent calculates the dot product of an array of vectors (A[]) and a vector (B),\n// typically used to calculate cosine similarity of embedding vectors.\n// Inputs:\n// matrix: Two dimentional array of numbers.\n// vector: One dimentional array of numbers.\n// Outputs:\n// { contents: Array } // array of docProduct of each vector (A[]) and vector B\nexport const dotProductAgent: AgentFunction, Array, { matrix: Array>; vector: Array }> = async ({\n namedInputs,\n}) => {\n assert(!!namedInputs, \"dotProductAgent: namedInputs is UNDEFINED!\");\n const matrix = namedInputs.matrix as Array>;\n const vector = namedInputs.vector as Array;\n if (matrix[0].length != vector.length) {\n throw new Error(`dotProduct: Length of vectors do not match. ${matrix[0].length}, ${vector.length}`);\n }\n const contents = matrix.map((vector0) => {\n return vector0.reduce((dotProduct: number, value, index) => {\n return dotProduct + value * vector[index];\n }, 0);\n });\n return contents;\n};\n\nconst dotProductAgentInfo: AgentFunctionInfo = {\n name: \"dotProductAgent\",\n agent: dotProductAgent,\n mock: dotProductAgent,\n inputs: {\n type: \"object\",\n properties: {\n matrix: {\n type: \"array\",\n description: \"two dimentional matrix\",\n items: {\n type: \"array\",\n items: {\n type: \"number\",\n },\n },\n },\n vector: {\n type: \"array\",\n description: \"the vector\",\n items: {\n type: \"number\",\n },\n },\n },\n required: [\"matrix\", \"vector\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n matrix: [\n [1, 2],\n [3, 4],\n [5, 6],\n ],\n vector: [3, 2],\n },\n params: {},\n result: [7, 17, 27],\n },\n {\n inputs: {\n matrix: [\n [1, 2],\n [2, 3],\n ],\n vector: [1, 2],\n },\n params: {},\n result: [5, 8],\n },\n ],\n description: \"dotProduct Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dotProductAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent returned a sorted array of one array (A) based on another array (B).\n// The default sorting order is \"decendant\".\n//\n// Parameters:\n// acendant: Specifies if the sorting order should be acendant. The default is \"false\" (decendant).\n// Inputs:\n// array: Array; // array to be sorted\n// values: Array; // array of numbers for sorting\n//\nexport const sortByValuesAgent: AgentFunction<\n {\n assendant?: boolean;\n },\n Array,\n {\n array: Array;\n values: Array;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"sortByValue: namedInputs is UNDEFINED!\");\n assert(!!namedInputs.array, \"sortByValue: namedInputs.array is UNDEFINED!\");\n assert(!!namedInputs.values, \"sortByValue: namedInputs.values is UNDEFINED!\");\n\n const direction = (params?.assendant ?? false) ? -1 : 1;\n const array: Array = namedInputs.array;\n const values: Array = namedInputs.values;\n const joined = array.map((item, index) => {\n return { item, value: values[index] };\n });\n const contents = joined\n .sort((a, b) => {\n return (b.value - a.value) * direction;\n })\n .map((a) => {\n return a.item;\n });\n return contents;\n};\n\nconst sortByValuesAgentInfo: AgentFunctionInfo = {\n name: \"sortByValuesAgent\",\n agent: sortByValuesAgent,\n mock: sortByValuesAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to sort\",\n },\n values: {\n type: \"array\",\n description: \"values associated with items in the array\",\n },\n },\n required: [\"array\", \"values\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {},\n result: [\"lemon\", \"orange\", \"apple\", \"banana\"],\n },\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {\n assendant: true,\n },\n result: [\"banana\", \"apple\", \"orange\", \"lemon\"],\n },\n ],\n description: \"sortByValues Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sortByValuesAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const echoAgent: AgentFunction = async ({ params, filterParams }) => {\n if (params.filterParams) {\n return filterParams;\n }\n return params;\n};\n\n// for test and document\nconst echoAgentInfo: AgentFunctionInfo = {\n name: \"echoAgent\",\n agent: echoAgent,\n mock: echoAgent,\n samples: [\n {\n inputs: {},\n params: { text: \"this is test\" },\n result: { text: \"this is test\" },\n },\n {\n inputs: {},\n params: {\n text: \"If you add filterParams option, it will respond to filterParams\",\n filterParams: true,\n },\n result: {},\n },\n ],\n description: \"Echo agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default echoAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const countingAgent: AgentFunction<{ count: number }, { list: number[] }> = async ({ params }) => {\n return {\n list: new Array(params.count).fill(undefined).map((_, i) => {\n return i;\n }),\n };\n};\n\n// for test and document\nconst countingAgentInfo: AgentFunctionInfo = {\n name: \"countingAgent\",\n agent: countingAgent,\n mock: countingAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4 },\n result: { list: [0, 1, 2, 3] },\n },\n ],\n description: \"Counting agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default countingAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const copyMessageAgent: AgentFunction<{ count: number; message: string }, { messages: string[] }> = async ({ params }) => {\n return {\n messages: new Array(params.count).fill(undefined).map(() => {\n return params.message;\n }),\n };\n};\n\n// for test and document\nconst copyMessageAgentInfo: AgentFunctionInfo = {\n name: \"copyMessageAgent\",\n agent: copyMessageAgent,\n mock: copyMessageAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4, message: \"hello\" },\n result: { messages: [\"hello\", \"hello\", \"hello\", \"hello\"] },\n },\n ],\n description: \"CopyMessage agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copyMessageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copy2ArrayAgent: AgentFunction<{ count: number }> = async ({ namedInputs, params }) => {\n assert(isNamedInputs(namedInputs), \"copy2ArrayAgent: namedInputs is UNDEFINED!\");\n const input = namedInputs.item ? namedInputs.item : namedInputs;\n return new Array(params.count).fill(undefined).map(() => {\n return input;\n });\n};\n\n// for test and document\nconst copy2ArrayAgentInfo: AgentFunctionInfo = {\n name: \"copy2ArrayAgent\",\n agent: copy2ArrayAgent,\n mock: copy2ArrayAgent,\n samples: [\n {\n inputs: { item: { message: \"hello\" } },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { message: \"hello\" },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { item: \"hello\" },\n params: { count: 10 },\n result: [\"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\"],\n },\n ],\n description: \"Copy2Array agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copy2ArrayAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const mergeNodeIdAgent: AgentFunction, { array: Record[] }> = async ({\n debugInfo: { nodeId },\n namedInputs,\n}) => {\n arrayValidate(\"mergeNodeIdAgent\", namedInputs);\n\n const dataSet = namedInputs.array;\n\n return dataSet.reduce(\n (tmp, input) => {\n return { ...tmp, ...input };\n },\n { [nodeId]: \"hello\" },\n );\n};\n\n// for test and document\nconst mergeNodeIdAgentInfo: AgentFunctionInfo = {\n name: \"mergeNodeIdAgent\",\n agent: mergeNodeIdAgent,\n mock: mergeNodeIdAgent,\n samples: [\n {\n inputs: { array: [{ message: \"hello\" }] },\n params: {},\n result: {\n message: \"hello\",\n test: \"hello\",\n },\n },\n ],\n description: \"merge node id agent\",\n category: [\"test\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default mergeNodeIdAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const streamMockAgent: AgentFunction = async ({ params, filterParams, namedInputs }) => {\n const message = params.message ?? namedInputs.message ?? \"\";\n\n for await (const token of message.split(\"\")) {\n if (filterParams.streamTokenCallback) {\n filterParams.streamTokenCallback(token);\n }\n await sleep(params.sleep || 100);\n }\n\n return { message };\n};\n\n// for test and document\nconst streamMockAgentInfo: AgentFunctionInfo = {\n name: \"streamMockAgent\",\n agent: streamMockAgent,\n mock: streamMockAgent,\n inputs: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n message: {\n type: \"string\",\n description: \"streaming message\",\n },\n },\n },\n {\n type: \"array\",\n },\n ],\n },\n samples: [\n {\n inputs: {},\n params: { message: \"this is params test\" },\n result: { message: \"this is params test\" },\n },\n {\n inputs: { message: \"this is named inputs test\" },\n params: {},\n result: { message: \"this is named inputs test\" },\n },\n ],\n description: \"Stream mock agent\",\n category: [\"test\"],\n author: \"Isamu Arimoto\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n stream: true,\n};\n\nexport default streamMockAgentInfo;\n","import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, StaticNodeData, GraphData } from \"graphai\";\nimport { GraphAI, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const nestedAgentGenerator: (graphData: GraphData) => (context: AgentFunctionContext) => Promise = (graphData: GraphData) => {\n return async (context: AgentFunctionContext) => {\n const { namedInputs, log, debugInfo, params, forNestedGraph } = context;\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n const throwError = params.throwError ?? false;\n if (taskManager) {\n const status = taskManager.getStatus(false);\n assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`);\n }\n assert(!!graphData, \"nestedAgent: graph is required\");\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n if (nodeIds.length > 0) {\n nodeIds.forEach((nodeId) => {\n if (nestedGraphData.nodes[nodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] };\n } else {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n (nestedGraphData.nodes[nodeId] as StaticNodeData)[\"value\"] = namedInputs[nodeId];\n }\n });\n }\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n\n const results = await graphAI.run(false);\n log?.push(...graphAI.transactionLogs());\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n };\n};\n\nexport const nestedAgent: AgentFunction<{ throwError?: boolean }> = async (context) => {\n const { forNestedGraph } = context;\n const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } };\n assert(!!graphData, \"No GraphData\");\n\n return await nestedAgentGenerator(graphData)(context);\n};\n\nconst nestedAgentInfo: AgentFunctionInfo = {\n name: \"nestedAgent\",\n agent: nestedAgent,\n mock: nestedAgent,\n samples: [\n {\n inputs: {\n message: \"hello\",\n },\n params: {},\n result: {\n test: [\"hello\"],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"messages\" },\n inputs: { messages: [\":message\"] },\n isResult: true,\n },\n },\n },\n },\n ],\n description: \"nested Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default nestedAgentInfo;\n","import { GraphAI, AgentFunction, AgentFunctionInfo, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const mapAgent: AgentFunction<\n {\n limit?: number;\n resultAll?: boolean;\n compositeResult?: boolean;\n throwError?: boolean;\n },\n Record\n> = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => {\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n\n if (taskManager) {\n const status = taskManager.getStatus();\n assert(status.concurrency > status.running, `mapAgent: Concurrency is too low: ${status.concurrency}`);\n }\n\n assert(!!namedInputs.rows, \"mapAgent: rows property is required in namedInput\");\n assert(!!graphData, \"mapAgent: graph is required\");\n\n const rows = namedInputs.rows.map((item: any) => item);\n if (params.limit && params.limit < rows.length) {\n rows.length = params.limit; // trim\n }\n const resultAll = params.resultAll ?? false;\n const throwError = params.throwError ?? false;\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n nestedGraphData.nodes[\"__mapIndex\"] = {};\n nodeIds.forEach((nodeId) => {\n const mappedNodeId = nodeId === \"rows\" ? \"row\" : nodeId;\n if (nestedGraphData.nodes[mappedNodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[mappedNodeId] = { value: namedInputs[nodeId] };\n } else if (!(\"agent\" in nestedGraphData.nodes[mappedNodeId])) {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n nestedGraphData.nodes[mappedNodeId][\"value\"] = namedInputs[nodeId];\n }\n });\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphs: Array = rows.map((row: any, index: number) => {\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n graphAI.injectValue(\"row\", row, \"__mapAgent_inputs__\");\n graphAI.injectValue(\"__mapIndex\", index, \"__mapAgent_inputs__\");\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n return graphAI;\n });\n\n const runs = graphs.map((graph) => {\n return graph.run(resultAll);\n });\n const results = await Promise.all(runs);\n const nodeIds = Object.keys(results[0]);\n // assert(nodeIds.length > 0, \"mapAgent: no return values (missing isResult)\");\n\n if (log) {\n const logs = graphs.map((graph, index) => {\n return graph.transactionLogs().map((log) => {\n log.mapIndex = index;\n return log;\n });\n });\n log.push(...logs.flat());\n }\n\n if (params.compositeResult) {\n const compositeResult = nodeIds.reduce((tmp: Record>, nodeId) => {\n tmp[nodeId] = results.map((result) => {\n return result[nodeId];\n });\n return tmp;\n }, {});\n return compositeResult;\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n};\n\nconst mapAgentInfo: AgentFunctionInfo = {\n name: \"mapAgent\",\n agent: mapAgent,\n mock: mapAgent,\n samples: [\n {\n inputs: {\n rows: [1, 2],\n },\n params: {},\n result: [{ test: [1] }, { test: [2] }],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${word}.\",\n },\n inputs: { word: \":row\" },\n isResult: true,\n },\n },\n },\n result: [\n { node2: \"I love apple.\" },\n { node2: \"I love orange.\" },\n { node2: \"I love banana.\" },\n { node2: \"I love lemon.\" },\n { node2: \"I love melon.\" },\n { node2: \"I love pineapple.\" },\n { node2: \"I love tomato.\" },\n ],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${item}.\",\n },\n inputs: { item: \":row.fruit\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"I love apple.\" }, { node2: \"I love orange.\" }],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n name: \"You\",\n verb: \"like\",\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"${name} ${verb} ${fruit}.\",\n },\n inputs: { fruit: \":row.fruit\", name: \":name\", verb: \":verb\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"You like apple.\" }, { node2: \"You like orange.\" }],\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n test: [1],\n row: 1,\n },\n {\n __mapIndex: 1,\n test: [2],\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n map: [\n {\n test: 1,\n },\n {\n test: 1,\n },\n ],\n row: 1,\n test: 1,\n },\n {\n __mapIndex: 1,\n map: [\n {\n test: 2,\n },\n {\n test: 2,\n },\n ],\n test: 2,\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n },\n },\n },\n },\n },\n },\n\n // old response\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${row}.\",\n },\n inputs: { row: \":row\" },\n isResult: true,\n },\n },\n },\n result: {\n node2: [\"I love apple.\", \"I love orange.\", \"I love banana.\", \"I love lemon.\", \"I love melon.\", \"I love pineapple.\", \"I love tomato.\"],\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n __mapIndex: [0, 1],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n __mapIndex: [0, 1],\n test: [[1], [2]],\n map: [\n {\n test: [[[1]], [[1]]],\n },\n {\n test: [[[2]], [[2]]],\n },\n ],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n },\n },\n },\n ],\n description: \"Map Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default mapAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const totalAgent: AgentFunction, Record, { array: Record[] }> = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((result, input) => {\n const inputArray = Array.isArray(input) ? input : [input];\n inputArray.forEach((innerInput) => {\n Object.keys(innerInput).forEach((key) => {\n const value = innerInput[key];\n if (result[key]) {\n result[key] += value;\n } else {\n result[key] = value;\n }\n });\n });\n return result;\n }, {});\n};\n\n//\nconst totalAgentInfo: AgentFunctionInfo = {\n name: \"totalAgent\",\n agent: totalAgent,\n mock: totalAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: { array: [[{ a: 1, b: -1 }, { c: 10 }], [{ a: 2, b: -1 }], [{ a: 3, b: -2 }, { d: -10 }]] },\n params: {},\n result: { a: 6, b: -4, c: 10, d: -10 },\n },\n {\n inputs: { array: [{ a: 1 }] },\n params: {},\n result: { a: 1 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }] },\n params: {},\n result: { a: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: {\n array: [\n { a: 1, b: 1 },\n { a: 2, b: 2 },\n { a: 3, b: 0 },\n ],\n },\n params: {},\n result: { a: 6, b: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2, b: 2 }, { a: 3, b: 0 }] },\n params: {},\n result: { a: 6, b: 2 },\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default totalAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const dataSumTemplateAgent: AgentFunction = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((tmp, input) => {\n return tmp + input;\n }, 0);\n};\n\nconst dataSumTemplateAgentInfo: AgentFunctionInfo = {\n name: \"dataSumTemplateAgent\",\n agent: dataSumTemplateAgent,\n mock: dataSumTemplateAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of numbers to calculate the sum of\",\n items: {\n type: \"integer\",\n },\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"number\",\n },\n samples: [\n {\n inputs: { array: [1] },\n params: {},\n result: 1,\n },\n {\n inputs: { array: [1, 2] },\n params: {},\n result: 3,\n },\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: 6,\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dataSumTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nconst applyFilter = (\n object: any,\n index: number,\n arrayInputs: any,\n include: Array | undefined,\n exclude: Array | undefined,\n alter: Record> | undefined,\n inject: Array> | undefined,\n swap: Record | undefined,\n inspect: Array> | undefined,\n) => {\n const propIds = include ? include : Object.keys(object);\n const excludeSet = new Set(exclude ?? []);\n const result = propIds.reduce((tmp: Record, propId) => {\n if (!excludeSet.has(propId)) {\n const mapping = alter && alter[propId];\n if (mapping && mapping[object[propId]]) {\n tmp[propId] = mapping[object[propId]];\n } else {\n tmp[propId] = object[propId];\n }\n }\n return tmp;\n }, {});\n\n if (inject) {\n inject.forEach((item) => {\n if (item.index === undefined || item.index === index) {\n result[item.propId] = arrayInputs[item.from];\n }\n });\n }\n if (inspect) {\n inspect.forEach((item) => {\n const value = arrayInputs[item.from ?? 1]; // default is arrayInputs[1]\n if (item.equal) {\n result[item.propId] = item.equal === value;\n } else if (item.notEqual) {\n result[item.propId] = item.notEqual !== value;\n }\n });\n }\n if (swap) {\n Object.keys(swap).forEach((key) => {\n const tmp = result[key];\n result[key] = result[swap[key]];\n result[swap[key]] = tmp;\n });\n }\n return result;\n};\n\nexport const propertyFilterAgent: AgentFunction<{\n include?: Array;\n exclude?: Array;\n alter?: Record>;\n inject?: Array>;\n inspect?: Array>;\n swap?: Record;\n}> = async ({ namedInputs, params }) => {\n const { include, exclude, alter, inject, swap, inspect } = params;\n const { array, item } = namedInputs;\n if (array) {\n // This is advanced usage, including \"inject\" and \"inspect\", which uses\n // array[1], array[2], ...\n const [target] = array; // Extract the first one\n if (Array.isArray(target)) {\n return target.map((item, index) => applyFilter(item, index, array, include, exclude, alter, inject, swap, inspect));\n }\n return applyFilter(target, 0, array, include, exclude, alter, inject, swap, inspect);\n } else if (item) {\n return applyFilter(item, 0, [], include, exclude, alter, inject, swap, inspect);\n }\n return false;\n};\n\nconst testInputs = {\n array: [\n [\n { color: \"red\", model: \"Model 3\", type: \"EV\", maker: \"Tesla\", range: 300 },\n { color: \"blue\", model: \"Model Y\", type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n \"Tesla Motors\",\n ],\n};\n\nconst propertyFilterAgentInfo: AgentFunctionInfo = {\n name: \"propertyFilterAgent\",\n agent: propertyFilterAgent,\n mock: propertyFilterAgent,\n inputs: {\n type: \"object\",\n },\n output: {\n type: \"any\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to apply filter\",\n },\n item: {\n type: \"object\",\n description: \"the object to apply filter\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [testInputs.array[0][0]] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: testInputs,\n params: { include: [\"color\", \"model\"] },\n result: [\n { color: \"red\", model: \"Model 3\" },\n { color: \"blue\", model: \"Model Y\" },\n ],\n },\n {\n inputs: testInputs,\n params: { exclude: [\"color\", \"model\"] },\n result: [\n { type: \"EV\", maker: \"Tesla\", range: 300 },\n { type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { exclude: [\"color\", \"model\"] },\n result: { type: \"EV\", maker: \"Tesla\", range: 300 },\n },\n {\n inputs: testInputs,\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: [\n {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n {\n color: \"red\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { swap: { maker: \"model\" } },\n result: [\n {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model Y\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { swap: { maker: \"model\" } },\n result: {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1, index: 0 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: {\n inspect: [\n { propId: \"isTesla\", equal: \"Tesla Motors\" }, // from: 1 is implied\n { propId: \"isGM\", notEqual: \"Tesla Motors\", from: 1 },\n ],\n },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n isTesla: true,\n isGM: false,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n isTesla: true,\n isGM: false,\n },\n ],\n },\n ],\n description: \"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default propertyFilterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copyAgent: AgentFunction<{\n namedKey?: string;\n}> = async ({ namedInputs, params }) => {\n const { namedKey } = params;\n assert(isNamedInputs(namedInputs), \"copyAgent: namedInputs is UNDEFINED!\");\n if (namedKey) {\n return namedInputs[namedKey];\n }\n return namedInputs;\n};\n\nconst copyAgentInfo: AgentFunctionInfo = {\n name: \"copyAgent\",\n agent: copyAgent,\n mock: copyAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n samples: [\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: {},\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { array: [\"Hello World\", \"Discarded\"] },\n params: {},\n result: { array: [\"Hello World\", \"Discarded\"] },\n },\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: { namedKey: \"color\" },\n result: \"red\",\n },\n ],\n description: \"Returns namedInputs\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default copyAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const vanillaFetchAgent: AgentFunction<{ debug?: boolean; type?: string; throwError?: boolean }, any, any> = async ({ namedInputs, params }) => {\n const { url, method, queryParams, headers, body } = namedInputs;\n const throwError = params.throwError ?? false;\n\n const url0 = new URL(url);\n const headers0 = headers ? { ...headers } : {};\n\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n url0.search = params.toString();\n }\n\n if (body) {\n headers0[\"Content-Type\"] = \"application/json\";\n }\n\n const fetchOptions: RequestInit = {\n method: (method ?? body) ? \"POST\" : \"GET\",\n headers: new Headers(headers0),\n body: body ? JSON.stringify(body) : undefined,\n };\n\n if (params?.debug) {\n return {\n url: url0.toString(),\n method: fetchOptions.method,\n headers: headers0,\n body: fetchOptions.body,\n };\n }\n\n const response = await fetch(url0.toString(), fetchOptions);\n\n if (!response.ok) {\n const status = response.status;\n const type = params?.type ?? \"json\";\n const error = type === \"json\" ? await response.json() : await response.text();\n if (throwError) {\n throw new Error(`HTTP error: ${status}`);\n }\n return {\n onError: {\n message: `HTTP error: ${status}`,\n status,\n error,\n },\n };\n }\n\n const result = await (async () => {\n const type = params?.type ?? \"json\";\n if (type === \"json\") {\n return await response.json();\n } else if (type === \"text\") {\n return response.text();\n }\n throw new Error(`Unknown Type! ${type}`);\n })();\n\n return result;\n};\n\nconst vanillaFetchAgentInfo: AgentFunctionInfo = {\n name: \"vanillaFetchAgent\",\n agent: vanillaFetchAgent,\n mock: vanillaFetchAgent,\n inputs: {\n type: \"object\",\n properties: {\n url: {\n type: \"string\",\n description: \"baseurl\",\n },\n method: {\n type: \"string\",\n description: \"HTTP method\",\n },\n headers: {\n type: \"object\",\n description: \"HTTP headers\",\n },\n quaryParams: {\n type: \"object\",\n description: \"Query parameters\",\n },\n body: {\n anyOf: [{ type: \"string\" }, { type: \"object\" }],\n description: \"body\",\n },\n },\n required: [\"url\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: { url: \"https://www.google.com\", queryParams: { foo: \"bar\" }, headers: { \"x-myHeader\": \"secret\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"GET\",\n url: \"https://www.google.com/?foo=bar\",\n headers: {\n \"x-myHeader\": \"secret\",\n },\n body: undefined,\n },\n },\n {\n inputs: { url: \"https://www.google.com\", body: { foo: \"bar\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"POST\",\n url: \"https://www.google.com/\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ foo: \"bar\" }),\n },\n },\n ],\n description: \"Retrieves JSON data from the specified URL\",\n category: [\"service\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default vanillaFetchAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const sleeperAgent: AgentFunction<{ duration?: number }> = async ({ params, namedInputs }) => {\n await sleep(params?.duration ?? 10);\n return namedInputs;\n};\n\nconst sleeperAgentInfo: AgentFunctionInfo = {\n name: \"sleeperAgent\",\n agent: sleeperAgent,\n mock: sleeperAgent,\n samples: [\n {\n inputs: {},\n params: { duration: 1 },\n result: {},\n },\n {\n inputs: { array: [{ a: 1 }, { b: 2 }] },\n params: { duration: 1 },\n result: {\n array: [{ a: 1 }, { b: 2 }],\n },\n },\n ],\n description: \"sleeper Agent\",\n category: [\"sleeper\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sleeperAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\ntype CompareDataItem = string | number | boolean | CompareData;\ntype CompareData = CompareDataItem[];\n\nconst compare = (_array: CompareData): boolean => {\n if (_array.length !== 3) {\n throw new Error(`compare inputs length must must be 3`);\n }\n const array = _array.map((value) => {\n if (Array.isArray(value)) {\n return compare(value);\n }\n return value;\n });\n const [a, operator, b] = array;\n if (operator === \"==\") {\n return a === b;\n }\n if (operator === \"!=\") {\n return a !== b;\n }\n if (operator === \">\") {\n return Number(a) > Number(b);\n }\n if (operator === \">=\") {\n return Number(a) >= Number(b);\n }\n if (operator === \"<\") {\n return Number(a) < Number(b);\n }\n if (operator === \"<=\") {\n return Number(a) <= Number(b);\n }\n if (operator === \"||\") {\n return !!a || !!b;\n }\n if (operator === \"&&\") {\n return !!a && !!b;\n }\n if (operator === \"XOR\") {\n return !!a === !b;\n }\n throw new Error(`unknown compare operator`);\n};\n\nexport const compareAgent: AgentFunction = async ({ namedInputs, params }) => {\n const ret = compare(namedInputs.array);\n if (params?.value) {\n return params?.value[ret ? \"true\" : \"false\"] ?? ret;\n }\n return ret;\n};\n\nconst compareAgentInfo: AgentFunctionInfo = {\n name: \"compareAgent\",\n agent: compareAgent,\n mock: compareAgent,\n inputs: {},\n output: {},\n samples: [\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"a\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abca\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"b\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abcd\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abc\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abcd\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"15\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">\", 15] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \">=\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 10\n inputs: { array: [\"10\", \">=\", \"19\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">=\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 19] },\n params: {},\n result: false,\n },\n //\n\n {\n inputs: { array: [\"10\", \"<\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<\", \"15\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<\", 15] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 20\n inputs: { array: [\"10\", \"<=\", \"19\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 19] },\n params: {},\n result: true,\n },\n\n {\n inputs: { array: [true, \"||\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"||\", false] },\n params: {},\n result: false,\n },\n\n {\n inputs: { array: [true, \"&&\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"&&\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [true, \"XOR\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"XOR\", true] },\n params: {},\n result: false,\n },\n //\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"||\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [[[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"bbb\", \"==\", \"bbb\"]], \"||\", [\"aaa\", \"&&\", \"bbb\"]] },\n params: {},\n result: true,\n },\n ],\n description: \"compare\",\n category: [\"compare\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default compareAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\n// https://platform.openai.com/docs/guides/vision\nconst getImageUrl = (data: string, imageType: string, detail?: string) => {\n if (imageType === \"http\") {\n return {\n url: data,\n };\n }\n const dataUrl = `data:image/${imageType};base64,${data}`;\n return {\n url: dataUrl,\n detail: detail ?? \"auto\",\n };\n};\n\ntype Content = { type: string; image_url: { url: string; detail?: string } } | { type: string; text: string };\n\nexport const images2messageAgent: AgentFunction<\n {\n imageType: string;\n detail?: string;\n },\n {\n message: {\n role: \"user\";\n content: Content[];\n };\n },\n {\n array: string[];\n prompt?: string;\n }\n> = async ({ namedInputs, params }) => {\n const { imageType, detail } = params;\n const { array, prompt } = namedInputs;\n arrayValidate(\"images2messageAgent\", namedInputs);\n assert(!!imageType, \"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...\");\n\n const contents: Content[] = array.map((base64ImageData) => {\n const image_url = getImageUrl(base64ImageData, imageType, detail);\n return {\n type: \"image_url\",\n image_url,\n };\n });\n\n if (prompt) {\n contents.unshift({ type: \"text\", text: prompt });\n }\n\n return {\n message: {\n role: \"user\",\n content: contents,\n },\n };\n};\n\nconst images2messageAgentInfo: AgentFunctionInfo = {\n name: \"images2messageAgent\",\n agent: images2messageAgent,\n mock: images2messageAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of base64 image data\",\n },\n prompt: {\n type: \"string\",\n description: \"prompt message\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [\"abcabc\", \"122123\"] },\n params: { imageType: \"png\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"abcabc\", \"122123\"], prompt: \"hello\" },\n params: { imageType: \"jpg\", detail: \"high\" },\n result: {\n message: {\n content: [\n {\n type: \"text\",\n text: \"hello\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"http://example.com/1.jpg\", \"http://example.com/2.jpg\"] },\n params: { imageType: \"http\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n url: \"http://example.com/1.jpg\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n url: \"http://example.com/2.jpg\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n ],\n description: \"Returns the message data for llm include image\",\n category: [\"image\"],\n author: \"Receptron team\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default images2messageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\n// Type for OpenAI's Embedding API\ninterface EmbeddingResponse {\n object: string;\n model: string;\n usage: {\n prompt_tokens: number;\n total_tokens: number;\n };\n data: [\n {\n object: string;\n index: number;\n embedding: number[];\n },\n ];\n}\n\nconst defaultEmbeddingModel = \"text-embedding-3-small\";\nconst OpenAI_embedding_API = \"https://api.openai.com/v1/embeddings\";\n\n// This agent retrieves embedding vectors for an array of strings using OpenAI's API\n//\n// Parameters:\n// model: Specifies the model (default is \"text-embedding-3-small\")\n// NamedInputs:\n// array: Array\n// item: string,\n// Result:\n// contents: Array>\n//\nexport const stringEmbeddingsAgent: AgentFunction<\n {\n model?: string;\n },\n number[][],\n { array: Array; item: string }\n> = async ({ params, namedInputs }) => {\n const { array, item } = namedInputs;\n\n const sources = array ?? [item];\n const apiKey = process.env.OPENAI_API_KEY;\n if (!apiKey) {\n throw new Error(\"OPENAI_API_KEY key is not set in environment variables.\");\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${apiKey}`,\n };\n\n const response = await fetch(OpenAI_embedding_API, {\n method: \"POST\",\n headers: headers,\n body: JSON.stringify({\n input: sources,\n model: params?.model ?? defaultEmbeddingModel,\n }),\n });\n const jsonResponse: EmbeddingResponse = await response.json();\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const embeddings = jsonResponse.data.map((object) => {\n return object.embedding;\n });\n return embeddings;\n};\n\nconst stringEmbeddingsAgentInfo: AgentFunctionInfo = {\n name: \"stringEmbeddingsAgent\",\n agent: stringEmbeddingsAgent,\n mock: stringEmbeddingsAgent,\n samples: [],\n description: \"Embeddings Agent\",\n category: [\"embedding\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringEmbeddingsAgentInfo;\n"],"names":["assert","isObject","arrayValidate","isNamedInputs","sleep","graphDataLatestVersion","GraphAI"],"mappings":";;;;;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAM,gBAAgB,GAAG,IAAI;IAEtB,MAAM,mBAAmB,GAc5B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAI;IACpC,IAAAA,cAAM,CAAC,CAAC,CAAC,WAAW,EAAE,gDAAgD,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;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"bundle.umd.js","sources":["../src/string_agents/string_splitter_agent.ts","../src/string_agents/string_template_agent.ts","../src/string_agents/json_parser_agent.ts","../src/string_agents/string_case_variants_agent.ts","../src/graph_agents/nested_agent.ts","../src/string_agents/update_text_agent.ts","../src/array_agents/push_agent.ts","../src/array_agents/pop_agent.ts","../src/array_agents/shift_agent.ts","../src/array_agents/array_flat_agent.ts","../src/array_agents/array_join_agent.ts","../src/matrix_agents/dot_product_agent.ts","../src/matrix_agents/sort_by_values_agent.ts","../src/test_agents/echo_agent.ts","../src/test_agents/counting_agent.ts","../src/test_agents/copy_message_agent.ts","../src/test_agents/copy2array_agent.ts","../src/test_agents/merge_node_id_agent.ts","../src/test_agents/stream_mock_agent.ts","../src/graph_agents/map_agent.ts","../src/data_agents/total_agent.ts","../src/data_agents/data_sum_template_agent.ts","../src/data_agents/property_filter_agent.ts","../src/data_agents/copy_agent.ts","../src/service_agents/vanilla_fetch_agent.ts","../src/sleeper_agents/sleeper_agent.ts","../src/compare_agents/compare_agent.ts","../src/images_agents/image_to_message_agent.ts","../src/embedding_agent.ts"],"sourcesContent":["import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent strip one long string into chunks using following parameters\n//\n// chunkSize: number; // default is 2048\n// overlap: number; // default is 1/8th of chunkSize.\n//\n// see example\n// tests/agents/test_string_agent.ts\n//\nconst defaultChunkSize = 2048;\n\nexport const stringSplitterAgent: AgentFunction<\n {\n chunkSize?: number;\n overlap?: number;\n },\n {\n contents: Array;\n count: number;\n chunkSize: number;\n overlap: number;\n },\n {\n text: string;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"stringSplitterAgent: namedInputs is UNDEFINED!\");\n const source = namedInputs.text;\n const chunkSize = params.chunkSize ?? defaultChunkSize;\n const overlap = params.overlap ?? Math.floor(chunkSize / 8);\n const count = Math.floor(source.length / (chunkSize - overlap)) + 1;\n const contents = new Array(count).fill(undefined).map((_, i) => {\n const startIndex = i * (chunkSize - overlap);\n return source.substring(startIndex, startIndex + chunkSize);\n });\n\n return { contents, count, chunkSize, overlap };\n};\n\n// for test and document\nconst sampleInput = {\n text: \"Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes ... the ones who see things differently -- they're not fond of rules, and they have no respect for the status quo. ... You can quote them, disagree with them, glorify or vilify them, but the only thing you can't do is ignore them because they change things. ... They push the human race forward, and while some may see them as the crazy ones, we see genius, because the people who are crazy enough to think that they can change the world, are the ones who do.\",\n};\n\nconst sampleParams = { chunkSize: 64 };\nconst sampleResult = {\n contents: [\n \"Here's to the crazy ones, the misfits, the rebels, the troublema\",\n \"roublemakers, the round pegs in the square holes ... the ones wh\",\n \" ones who see things differently -- they're not fond of rules, a\",\n \"rules, and they have no respect for the status quo. ... You can \",\n \"You can quote them, disagree with them, glorify or vilify them, \",\n \"y them, but the only thing you can't do is ignore them because t\",\n \"ecause they change things. ... They push the human race forward,\",\n \"forward, and while some may see them as the crazy ones, we see g\",\n \"we see genius, because the people who are crazy enough to think \",\n \"o think that they can change the world, are the ones who do.\",\n \" do.\",\n ],\n count: 11,\n chunkSize: 64,\n overlap: 8,\n};\n\nconst stringSplitterAgentInfo: AgentFunctionInfo = {\n name: \"stringSplitterAgent\",\n agent: stringSplitterAgent,\n mock: stringSplitterAgent,\n inputs: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"text to be chuncked\",\n },\n },\n required: [\"text\"],\n },\n output: {\n type: \"object\",\n properties: {\n contents: {\n type: \"array\",\n description: \"the array of text chunks\",\n },\n count: {\n type: \"number\",\n description: \"the number of chunks\",\n },\n chunkSize: {\n type: \"number\",\n description: \"the chunk size\",\n },\n overlap: {\n type: \"number\",\n description: \"the overlap size\",\n },\n },\n },\n samples: [\n {\n inputs: sampleInput,\n params: sampleParams,\n result: sampleResult,\n },\n ],\n description: \"This agent strip one long string into chunks using following parameters\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringSplitterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, isObject } from \"graphai\";\n\ntype StringTemplate = string | Record;\ntype StringTemplateObject = StringTemplate | StringTemplate[] | Record;\n\nconst processTemplate: any = (template: StringTemplateObject, match: string, input: string) => {\n if (typeof template === \"string\") {\n if (template === match) {\n return input;\n }\n return template.replace(match, input);\n } else if (Array.isArray(template)) {\n return template.map((item: StringTemplate) => processTemplate(item, match, input));\n }\n\n if (isObject(template)) {\n return Object.keys(template).reduce((tmp: any, key: string) => {\n tmp[key] = processTemplate(template[key], match, input);\n return tmp;\n }, {});\n }\n return template;\n};\n\nexport const stringTemplateAgent: AgentFunction<\n {\n template: StringTemplateObject;\n },\n StringTemplateObject,\n Record\n> = async ({ params, namedInputs }) => {\n if (params.template === undefined) {\n if (namedInputs.text) {\n return namedInputs.text;\n }\n console.warn(\"warning: stringTemplateAgent no template\");\n }\n return Object.keys(namedInputs).reduce((template, key) => {\n return processTemplate(template, \"${\" + key + \"}\", namedInputs[key]);\n }, params.template);\n};\n\nconst sampleNamedInput = { message1: \"hello\", message2: \"test\" };\n\n// for test and document\nconst stringTemplateAgentInfo: AgentFunctionInfo = {\n name: \"stringTemplateAgent\",\n agent: stringTemplateAgent,\n mock: stringTemplateAgent,\n samples: [\n // named\n {\n inputs: sampleNamedInput,\n params: { template: \"${message1}: ${message2}\" },\n result: \"hello: test\",\n },\n {\n inputs: sampleNamedInput,\n params: { template: [\"${message1}: ${message2}\", \"${message2}: ${message1}\"] },\n result: [\"hello: test\", \"test: hello\"],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: \"${message2}\" } },\n result: { apple: \"hello\", lemon: \"test\" },\n },\n {\n inputs: sampleNamedInput,\n params: { template: [{ apple: \"${message1}\", lemon: \"${message2}\" }] },\n result: [{ apple: \"hello\", lemon: \"test\" }],\n },\n {\n inputs: sampleNamedInput,\n params: { template: { apple: \"${message1}\", lemon: [\"${message2}\"] } },\n result: { apple: \"hello\", lemon: [\"test\"] },\n },\n // graphData\n {\n inputs: { agent: \"openAiAgent\", row: \"hello world\", params: { text: \"message\" } },\n params: {\n template: {\n version: 0.5,\n nodes: {\n ai: {\n agent: \"${agent}\",\n isResult: true,\n params: \"${params}\",\n inputs: { prompt: \"${row}\" },\n },\n },\n },\n },\n result: {\n nodes: {\n ai: {\n agent: \"openAiAgent\",\n inputs: {\n prompt: \"hello world\",\n },\n isResult: true,\n params: { text: \"message\" },\n },\n },\n version: 0.5,\n },\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const jsonParserAgent: AgentFunction<\n null,\n unknown,\n {\n text: string;\n data: unknown;\n }\n> = async ({ namedInputs }) => {\n const { text, data } = namedInputs;\n\n if (data) {\n return JSON.stringify(data, null, 2);\n }\n const match = (\"\\n\" + text).match(/\\n```[a-zA-z]*([\\s\\S]*?)\\n```/);\n if (match) {\n return JSON.parse(match[1]);\n }\n return JSON.parse(text);\n};\n\nconst sample_object = { apple: \"red\", lemon: \"yellow\" };\n\nconst json_str = JSON.stringify(sample_object);\nconst md_json1 = [\"```\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json2 = [\"```json\", json_str, \"```\"].join(\"\\n\");\n\nconst md_json3 = [\"```JSON\", json_str, \"```\"].join(\"\\n\");\n\nconst jsonParserAgentInfo: AgentFunctionInfo = {\n name: \"jsonParserAgent\",\n agent: jsonParserAgent,\n mock: jsonParserAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n type: \"string\",\n },\n samples: [\n {\n inputs: { data: sample_object },\n params: {},\n result: JSON.stringify(sample_object, null, 2),\n },\n {\n inputs: { text: JSON.stringify(sample_object, null, 2) },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json1 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json2 },\n params: {},\n result: sample_object,\n },\n {\n inputs: { text: md_json3 },\n params: {},\n result: sample_object,\n },\n ],\n description: \"Template agent\",\n category: [\"string\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default jsonParserAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const stringCaseVariantsAgent: AgentFunction<\n { suffix?: string },\n { lowerCamelCase: string; snakeCase: string; kebabCase: string; normalized: string },\n { text: string }\n> = async ({ namedInputs, params }) => {\n const { suffix } = params;\n const normalizedArray = namedInputs.text\n .trim()\n .replace(/[\\s-_]+/g, \" \")\n .toLowerCase()\n .split(\" \");\n if (suffix && normalizedArray[normalizedArray.length - 1] !== suffix) {\n normalizedArray.push(suffix);\n }\n const normalized = normalizedArray.join(\" \");\n\n const lowerCamelCase = normalizedArray\n .map((word, index) => {\n if (index === 0) return word;\n return word.charAt(0).toUpperCase() + word.slice(1);\n })\n .join(\"\");\n\n const snakeCase = normalized.replace(/\\s+/g, \"_\");\n const kebabCase = normalized.replace(/\\s+/g, \"-\");\n\n return { lowerCamelCase, snakeCase, kebabCase, normalized };\n};\n\nconst stringCaseVariantsAgentInfo: AgentFunctionInfo = {\n name: \"stringCaseVariantsAgent\",\n agent: stringCaseVariantsAgent,\n mock: stringCaseVariantsAgent,\n samples: [\n {\n inputs: { text: \"this is a pen\" },\n params: {},\n result: {\n kebabCase: \"this-is-a-pen\",\n lowerCamelCase: \"thisIsAPen\",\n normalized: \"this is a pen\",\n snakeCase: \"this_is_a_pen\",\n },\n },\n {\n inputs: { text: \"string case variants\" },\n params: { suffix: \"agent\" },\n result: {\n kebabCase: \"string-case-variants-agent\",\n lowerCamelCase: \"stringCaseVariantsAgent\",\n normalized: \"string case variants agent\",\n snakeCase: \"string_case_variants_agent\",\n },\n },\n ],\n description: \"Format String Cases agent\",\n category: [\"string\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringCaseVariantsAgentInfo;\n","import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, StaticNodeData, GraphData } from \"graphai\";\nimport { GraphAI, assert, graphDataLatestVersion } from \"graphai\";\n\ntype NestedAgentGeneratorOption = {\n resultNodeId: string;\n};\nexport const nestedAgentGenerator: (graphData: GraphData, options?: NestedAgentGeneratorOption) => (context: AgentFunctionContext) => Promise = (\n graphData: GraphData,\n options?: NestedAgentGeneratorOption,\n) => {\n return async (context: AgentFunctionContext) => {\n const { namedInputs, log, debugInfo, params, forNestedGraph } = context;\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n const throwError = params.throwError ?? false;\n if (taskManager) {\n const status = taskManager.getStatus(false);\n assert(status.concurrency > status.running, `nestedAgent: Concurrency is too low: ${status.concurrency}`);\n }\n assert(!!graphData, \"nestedAgent: graph is required\");\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n if (nodeIds.length > 0) {\n nodeIds.forEach((nodeId) => {\n if (nestedGraphData.nodes[nodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[nodeId] = { value: namedInputs[nodeId] };\n } else {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n (nestedGraphData.nodes[nodeId] as StaticNodeData)[\"value\"] = namedInputs[nodeId];\n }\n });\n }\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n\n const results = await graphAI.run(false);\n log?.push(...graphAI.transactionLogs());\n\n if (options && options.resultNodeId) {\n return results[options.resultNodeId];\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n };\n};\n\nexport const nestedAgent: AgentFunction<{ throwError?: boolean }> = async (context) => {\n const { forNestedGraph } = context;\n const { graphData } = forNestedGraph ?? { graphData: { nodes: {} } };\n assert(!!graphData, \"No GraphData\");\n\n return await nestedAgentGenerator(graphData)(context);\n};\n\nconst nestedAgentInfo: AgentFunctionInfo = {\n name: \"nestedAgent\",\n agent: nestedAgent,\n mock: nestedAgent,\n samples: [\n {\n inputs: {\n message: \"hello\",\n },\n params: {},\n result: {\n test: [\"hello\"],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"messages\" },\n inputs: { messages: [\":message\"] },\n isResult: true,\n },\n },\n },\n },\n ],\n description: \"nested Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default nestedAgentInfo;\n","import { nestedAgentGenerator } from \"@/generator\";\nimport { graphDataLatestVersion } from \"graphai\";\n\nconst updateTextGraph = {\n version: graphDataLatestVersion,\n nodes: {\n isNewText: {\n if: \":newText\",\n agent: \"copyAgent\",\n inputs: {\n text: \":newText\",\n },\n },\n isOldText: {\n unless: \":newText\",\n agent: \"copyAgent\",\n inputs: {\n text: \":oldText\",\n },\n },\n updatedText: {\n agent: \"copyAgent\",\n anyInput: true,\n inputs: {\n text: [\":isNewText.text\", \":isOldText.text\"],\n },\n },\n resultText: {\n isResult: true,\n agent: \"copyAgent\",\n anyInput: true,\n inputs: {\n text: \":updatedText.text.$0\",\n },\n },\n },\n};\n\nconst updateTextAgent = nestedAgentGenerator(updateTextGraph, { resultNodeId: \"resultText\" });\n\nconst updateTextAgentInfo = {\n name: \"updateTextAgent\",\n agent: updateTextAgent,\n mock: updateTextAgent,\n samples: [\n {\n inputs: { newText: \"new\", oldText: \"old\" },\n params: {},\n result: { text: \"new\" },\n },\n {\n inputs: { newText: \"\", oldText: \"old\" },\n params: {},\n result: { text: \"old\" },\n },\n ],\n description: \"\",\n category: [],\n author: \"\",\n repository: \"\",\n tools: [],\n license: \"\",\n hasGraphData: true,\n};\n\nexport default updateTextAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const pushAgent: AgentFunction }, { array: Array; item?: unknown; items: Array }> = async ({\n namedInputs,\n}) => {\n const extra_message = \" Set inputs: { array: :arrayNodeId, item: :itemNodeId }\";\n arrayValidate(\"pushAgent\", namedInputs, extra_message);\n const { item, items } = namedInputs;\n assert(!!(item || items), \"pushAgent: namedInputs.item is UNDEFINED!\" + extra_message);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n if (item) {\n array.push(item);\n } else {\n items.forEach((item) => {\n array.push(item);\n });\n }\n return {\n array,\n };\n};\n\nconst pushAgentInfo: AgentFunctionInfo = {\n name: \"pushAgent\",\n agent: pushAgent,\n mock: pushAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to push an item to\",\n },\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n items: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item push into the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2], item: 3 },\n params: {},\n result: { array: [1, 2, 3] },\n },\n {\n inputs: { array: [{ apple: 1 }], item: { lemon: 2 } },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }] },\n },\n {\n inputs: { array: [{ apple: 1 }], items: [{ lemon: 2 }, { banana: 3 }] },\n params: {},\n result: { array: [{ apple: 1 }, { lemon: 2 }, { banana: 3 }] },\n },\n ],\n description: \"push Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default pushAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const popAgent: AgentFunction; item: unknown }, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"popAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.pop();\n return { array, item };\n};\n\nconst popAgentInfo: AgentFunctionInfo = {\n name: \"popAgent\",\n agent: popAgent,\n mock: popAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to pop an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item popped from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"a\", \"b\"],\n item: \"c\",\n },\n },\n {\n inputs: {\n array: [1, 2, 3],\n array2: [\"a\", \"b\", \"c\"],\n },\n params: {},\n result: {\n array: [1, 2],\n item: 3,\n },\n },\n ],\n description: \"Pop Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default popAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const shiftAgent: AgentFunction, Record, { array: Array }> = async ({ namedInputs }) => {\n arrayValidate(\"shiftAgent\", namedInputs);\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n const item = array.shift();\n return { array, item };\n};\n\nconst shiftAgentInfo: AgentFunctionInfo = {\n name: \"shiftAgent\",\n agent: shiftAgent,\n mock: shiftAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to shift an item from\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n item: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n description: \"the item shifted from the array\",\n },\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: {\n array: [2, 3],\n item: 1,\n },\n },\n {\n inputs: { array: [\"a\", \"b\", \"c\"] },\n params: {},\n result: {\n array: [\"b\", \"c\"],\n item: \"a\",\n },\n },\n ],\n description: \"shift Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default shiftAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayFlatAgent: AgentFunction<{ depth?: number }, { array: Array }, { array: Array }> = async ({ namedInputs, params }) => {\n arrayValidate(\"arrayFlatAgent\", namedInputs);\n const depth = params.depth ?? 1;\n\n const array = namedInputs.array.map((item: any) => item); // shallow copy\n return { array: array.flat(depth) };\n};\n\nconst arrayFlatAgentInfo: AgentFunctionInfo = {\n name: \"arrayFlatAgent\",\n agent: arrayFlatAgent,\n mock: arrayFlatAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"flat array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the remaining array\",\n },\n },\n },\n params: {\n type: \"object\",\n properties: {\n depth: {\n type: \"number\",\n description: \"array depth\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n array: [1, 2, [3]],\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: { depth: 2 },\n result: {\n array: [1, 2, 3],\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n array: [\"a\", \"b\", \"c\"],\n },\n },\n ],\n description: \"Array Flat Agent\",\n category: [\"array\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n cacheType: \"pureAgent\",\n license: \"MIT\",\n};\nexport default arrayFlatAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const arrayJoinAgent: AgentFunction<{ separator?: string; flat?: number }, { text: string }, { array: Array }> = async ({\n namedInputs,\n params,\n}) => {\n arrayValidate(\"arrayJoinAgent\", namedInputs);\n const separator = params.separator ?? \"\";\n const { flat } = params;\n\n const text = flat ? namedInputs.array.flat(flat).join(separator) : namedInputs.array.join(separator);\n return { text };\n};\n\nconst arrayJoinAgentInfo: AgentFunctionInfo = {\n name: \"arrayJoinAgent\",\n agent: arrayJoinAgent,\n mock: arrayJoinAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"array join\",\n },\n },\n required: [\"array\"],\n },\n params: {\n type: \"object\",\n properties: {\n separator: {\n type: \"string\",\n description: \"array join separator\",\n },\n flat: {\n type: \"number\",\n description: \"array flat depth\",\n },\n },\n },\n output: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n description: \"joined text\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [[1], [2], [3]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[1], [2], [[3]]] },\n params: {},\n result: {\n text: \"123\",\n },\n },\n {\n inputs: { array: [[\"a\"], [\"b\"], [\"c\"]] },\n params: {},\n result: {\n text: \"abc\",\n },\n },\n //\n {\n inputs: { array: [[1], [2], [3]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\" },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[1]], [[2], [3]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2|3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 1 },\n result: {\n text: \"1|2,3\",\n },\n },\n {\n inputs: { array: [[[[1]], [[2], [3]]]] },\n params: { separator: \"|\", flat: 2 },\n result: {\n text: \"1|2|3\",\n },\n },\n ],\n description: \"Array Join Agent\",\n category: [\"array\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default arrayJoinAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent calculates the dot product of an array of vectors (A[]) and a vector (B),\n// typically used to calculate cosine similarity of embedding vectors.\n// Inputs:\n// matrix: Two dimentional array of numbers.\n// vector: One dimentional array of numbers.\n// Outputs:\n// { contents: Array } // array of docProduct of each vector (A[]) and vector B\nexport const dotProductAgent: AgentFunction, Array, { matrix: Array>; vector: Array }> = async ({\n namedInputs,\n}) => {\n assert(!!namedInputs, \"dotProductAgent: namedInputs is UNDEFINED!\");\n const matrix = namedInputs.matrix as Array>;\n const vector = namedInputs.vector as Array;\n if (matrix[0].length != vector.length) {\n throw new Error(`dotProduct: Length of vectors do not match. ${matrix[0].length}, ${vector.length}`);\n }\n const contents = matrix.map((vector0) => {\n return vector0.reduce((dotProduct: number, value, index) => {\n return dotProduct + value * vector[index];\n }, 0);\n });\n return contents;\n};\n\nconst dotProductAgentInfo: AgentFunctionInfo = {\n name: \"dotProductAgent\",\n agent: dotProductAgent,\n mock: dotProductAgent,\n inputs: {\n type: \"object\",\n properties: {\n matrix: {\n type: \"array\",\n description: \"two dimentional matrix\",\n items: {\n type: \"array\",\n items: {\n type: \"number\",\n },\n },\n },\n vector: {\n type: \"array\",\n description: \"the vector\",\n items: {\n type: \"number\",\n },\n },\n },\n required: [\"matrix\", \"vector\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n matrix: [\n [1, 2],\n [3, 4],\n [5, 6],\n ],\n vector: [3, 2],\n },\n params: {},\n result: [7, 17, 27],\n },\n {\n inputs: {\n matrix: [\n [1, 2],\n [2, 3],\n ],\n vector: [1, 2],\n },\n params: {},\n result: [5, 8],\n },\n ],\n description: \"dotProduct Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dotProductAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\n\n// This agent returned a sorted array of one array (A) based on another array (B).\n// The default sorting order is \"decendant\".\n//\n// Parameters:\n// acendant: Specifies if the sorting order should be acendant. The default is \"false\" (decendant).\n// Inputs:\n// array: Array; // array to be sorted\n// values: Array; // array of numbers for sorting\n//\nexport const sortByValuesAgent: AgentFunction<\n {\n assendant?: boolean;\n },\n Array,\n {\n array: Array;\n values: Array;\n }\n> = async ({ params, namedInputs }) => {\n assert(!!namedInputs, \"sortByValue: namedInputs is UNDEFINED!\");\n assert(!!namedInputs.array, \"sortByValue: namedInputs.array is UNDEFINED!\");\n assert(!!namedInputs.values, \"sortByValue: namedInputs.values is UNDEFINED!\");\n\n const direction = (params?.assendant ?? false) ? -1 : 1;\n const array: Array = namedInputs.array;\n const values: Array = namedInputs.values;\n const joined = array.map((item, index) => {\n return { item, value: values[index] };\n });\n const contents = joined\n .sort((a, b) => {\n return (b.value - a.value) * direction;\n })\n .map((a) => {\n return a.item;\n });\n return contents;\n};\n\nconst sortByValuesAgentInfo: AgentFunctionInfo = {\n name: \"sortByValuesAgent\",\n agent: sortByValuesAgent,\n mock: sortByValuesAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to sort\",\n },\n values: {\n type: \"array\",\n description: \"values associated with items in the array\",\n },\n },\n required: [\"array\", \"values\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {},\n result: [\"lemon\", \"orange\", \"apple\", \"banana\"],\n },\n {\n inputs: {\n array: [\"banana\", \"orange\", \"lemon\", \"apple\"],\n values: [2, 5, 6, 4],\n },\n params: {\n assendant: true,\n },\n result: [\"banana\", \"apple\", \"orange\", \"lemon\"],\n },\n ],\n description: \"sortByValues Agent\",\n category: [\"matrix\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sortByValuesAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const echoAgent: AgentFunction = async ({ params, filterParams }) => {\n if (params.filterParams) {\n return filterParams;\n }\n return params;\n};\n\n// for test and document\nconst echoAgentInfo: AgentFunctionInfo = {\n name: \"echoAgent\",\n agent: echoAgent,\n mock: echoAgent,\n samples: [\n {\n inputs: {},\n params: { text: \"this is test\" },\n result: { text: \"this is test\" },\n },\n {\n inputs: {},\n params: {\n text: \"If you add filterParams option, it will respond to filterParams\",\n filterParams: true,\n },\n result: {},\n },\n ],\n description: \"Echo agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default echoAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const countingAgent: AgentFunction<{ count: number }, { list: number[] }> = async ({ params }) => {\n return {\n list: new Array(params.count).fill(undefined).map((_, i) => {\n return i;\n }),\n };\n};\n\n// for test and document\nconst countingAgentInfo: AgentFunctionInfo = {\n name: \"countingAgent\",\n agent: countingAgent,\n mock: countingAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4 },\n result: { list: [0, 1, 2, 3] },\n },\n ],\n description: \"Counting agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default countingAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const copyMessageAgent: AgentFunction<{ count: number; message: string }, { messages: string[] }> = async ({ params }) => {\n return {\n messages: new Array(params.count).fill(undefined).map(() => {\n return params.message;\n }),\n };\n};\n\n// for test and document\nconst copyMessageAgentInfo: AgentFunctionInfo = {\n name: \"copyMessageAgent\",\n agent: copyMessageAgent,\n mock: copyMessageAgent,\n samples: [\n {\n inputs: {},\n params: { count: 4, message: \"hello\" },\n result: { messages: [\"hello\", \"hello\", \"hello\", \"hello\"] },\n },\n ],\n description: \"CopyMessage agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copyMessageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copy2ArrayAgent: AgentFunction<{ count: number }> = async ({ namedInputs, params }) => {\n assert(isNamedInputs(namedInputs), \"copy2ArrayAgent: namedInputs is UNDEFINED!\");\n const input = namedInputs.item ? namedInputs.item : namedInputs;\n return new Array(params.count).fill(undefined).map(() => {\n return input;\n });\n};\n\n// for test and document\nconst copy2ArrayAgentInfo: AgentFunctionInfo = {\n name: \"copy2ArrayAgent\",\n agent: copy2ArrayAgent,\n mock: copy2ArrayAgent,\n samples: [\n {\n inputs: { item: { message: \"hello\" } },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { message: \"hello\" },\n params: { count: 10 },\n result: [\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n { message: \"hello\" },\n ],\n },\n {\n inputs: { item: \"hello\" },\n params: { count: 10 },\n result: [\"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\", \"hello\"],\n },\n ],\n description: \"Copy2Array agent\",\n category: [\"test\"],\n cacheType: \"pureAgent\",\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default copy2ArrayAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\nexport const mergeNodeIdAgent: AgentFunction, { array: Record[] }> = async ({\n debugInfo: { nodeId },\n namedInputs,\n}) => {\n arrayValidate(\"mergeNodeIdAgent\", namedInputs);\n\n const dataSet = namedInputs.array;\n\n return dataSet.reduce(\n (tmp, input) => {\n return { ...tmp, ...input };\n },\n { [nodeId]: \"hello\" },\n );\n};\n\n// for test and document\nconst mergeNodeIdAgentInfo: AgentFunctionInfo = {\n name: \"mergeNodeIdAgent\",\n agent: mergeNodeIdAgent,\n mock: mergeNodeIdAgent,\n samples: [\n {\n inputs: { array: [{ message: \"hello\" }] },\n params: {},\n result: {\n message: \"hello\",\n test: \"hello\",\n },\n },\n ],\n description: \"merge node id agent\",\n category: [\"test\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\n\nexport default mergeNodeIdAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const streamMockAgent: AgentFunction = async ({ params, filterParams, namedInputs }) => {\n const message = params.message ?? namedInputs.message ?? \"\";\n\n for await (const token of message.split(\"\")) {\n if (filterParams.streamTokenCallback) {\n filterParams.streamTokenCallback(token);\n }\n await sleep(params.sleep || 100);\n }\n\n return { message };\n};\n\n// for test and document\nconst streamMockAgentInfo: AgentFunctionInfo = {\n name: \"streamMockAgent\",\n agent: streamMockAgent,\n mock: streamMockAgent,\n inputs: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n message: {\n type: \"string\",\n description: \"streaming message\",\n },\n },\n },\n {\n type: \"array\",\n },\n ],\n },\n samples: [\n {\n inputs: {},\n params: { message: \"this is params test\" },\n result: { message: \"this is params test\" },\n },\n {\n inputs: { message: \"this is named inputs test\" },\n params: {},\n result: { message: \"this is named inputs test\" },\n },\n ],\n description: \"Stream mock agent\",\n category: [\"test\"],\n author: \"Isamu Arimoto\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n stream: true,\n};\n\nexport default streamMockAgentInfo;\n","import { GraphAI, AgentFunction, AgentFunctionInfo, assert, graphDataLatestVersion } from \"graphai\";\n\nexport const mapAgent: AgentFunction<\n {\n limit?: number;\n resultAll?: boolean;\n compositeResult?: boolean;\n throwError?: boolean;\n },\n Record\n> = async ({ params, namedInputs, log, debugInfo, forNestedGraph }) => {\n assert(!!forNestedGraph, \"Please update graphai to 0.5.19 or higher\");\n\n const { agents, graphData, graphOptions, onLogCallback } = forNestedGraph;\n const { taskManager } = graphOptions;\n\n if (taskManager) {\n const status = taskManager.getStatus();\n assert(status.concurrency > status.running, `mapAgent: Concurrency is too low: ${status.concurrency}`);\n }\n\n assert(!!namedInputs.rows, \"mapAgent: rows property is required in namedInput\");\n assert(!!graphData, \"mapAgent: graph is required\");\n\n const rows = namedInputs.rows.map((item: any) => item);\n if (params.limit && params.limit < rows.length) {\n rows.length = params.limit; // trim\n }\n const resultAll = params.resultAll ?? false;\n const throwError = params.throwError ?? false;\n\n const { nodes } = graphData;\n const nestedGraphData = { ...graphData, nodes: { ...nodes }, version: graphDataLatestVersion }; // deep enough copy\n\n const nodeIds = Object.keys(namedInputs);\n nestedGraphData.nodes[\"__mapIndex\"] = {};\n nodeIds.forEach((nodeId) => {\n const mappedNodeId = nodeId === \"rows\" ? \"row\" : nodeId;\n if (nestedGraphData.nodes[mappedNodeId] === undefined) {\n // If the input node does not exist, automatically create a static node\n nestedGraphData.nodes[mappedNodeId] = { value: namedInputs[nodeId] };\n } else if (!(\"agent\" in nestedGraphData.nodes[mappedNodeId])) {\n // Otherwise, inject the proper data here (instead of calling injectTo method later)\n nestedGraphData.nodes[mappedNodeId][\"value\"] = namedInputs[nodeId];\n }\n });\n\n try {\n if (nestedGraphData.version === undefined && debugInfo.version) {\n nestedGraphData.version = debugInfo.version;\n }\n const graphs: Array = rows.map((row: any, index: number) => {\n const graphAI = new GraphAI(nestedGraphData, agents || {}, graphOptions);\n graphAI.injectValue(\"row\", row, \"__mapAgent_inputs__\");\n graphAI.injectValue(\"__mapIndex\", index, \"__mapAgent_inputs__\");\n // for backward compatibility. Remove 'if' later\n if (onLogCallback) {\n graphAI.onLogCallback = onLogCallback;\n }\n return graphAI;\n });\n\n const runs = graphs.map((graph) => {\n return graph.run(resultAll);\n });\n const results = await Promise.all(runs);\n const nodeIds = Object.keys(results[0]);\n // assert(nodeIds.length > 0, \"mapAgent: no return values (missing isResult)\");\n\n if (log) {\n const logs = graphs.map((graph, index) => {\n return graph.transactionLogs().map((log) => {\n log.mapIndex = index;\n return log;\n });\n });\n log.push(...logs.flat());\n }\n\n if (params.compositeResult) {\n const compositeResult = nodeIds.reduce((tmp: Record>, nodeId) => {\n tmp[nodeId] = results.map((result) => {\n return result[nodeId];\n });\n return tmp;\n }, {});\n return compositeResult;\n }\n return results;\n } catch (error) {\n if (error instanceof Error && !throwError) {\n return {\n onError: {\n message: error.message,\n error,\n },\n };\n }\n throw error;\n }\n};\n\nconst mapAgentInfo: AgentFunctionInfo = {\n name: \"mapAgent\",\n agent: mapAgent,\n mock: mapAgent,\n samples: [\n {\n inputs: {\n rows: [1, 2],\n },\n params: {},\n result: [{ test: [1] }, { test: [2] }],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${word}.\",\n },\n inputs: { word: \":row\" },\n isResult: true,\n },\n },\n },\n result: [\n { node2: \"I love apple.\" },\n { node2: \"I love orange.\" },\n { node2: \"I love banana.\" },\n { node2: \"I love lemon.\" },\n { node2: \"I love melon.\" },\n { node2: \"I love pineapple.\" },\n { node2: \"I love tomato.\" },\n ],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${item}.\",\n },\n inputs: { item: \":row.fruit\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"I love apple.\" }, { node2: \"I love orange.\" }],\n },\n {\n inputs: {\n rows: [{ fruit: \"apple\" }, { fruit: \"orange\" }],\n name: \"You\",\n verb: \"like\",\n },\n params: {},\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"${name} ${verb} ${fruit}.\",\n },\n inputs: { fruit: \":row.fruit\", name: \":name\", verb: \":verb\" },\n isResult: true,\n },\n },\n },\n result: [{ node2: \"You like apple.\" }, { node2: \"You like orange.\" }],\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n test: [1],\n row: 1,\n },\n {\n __mapIndex: 1,\n test: [2],\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n },\n result: [\n {\n __mapIndex: 0,\n map: [\n {\n test: 1,\n },\n {\n test: 1,\n },\n ],\n row: 1,\n test: 1,\n },\n {\n __mapIndex: 1,\n map: [\n {\n test: 2,\n },\n {\n test: 2,\n },\n ],\n test: 2,\n row: 2,\n },\n ],\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"row\" },\n inputs: { row: \":row\" },\n },\n },\n },\n },\n },\n },\n },\n\n // old response\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n isResult: true,\n },\n },\n },\n },\n {\n inputs: {\n rows: [\"apple\", \"orange\", \"banana\", \"lemon\", \"melon\", \"pineapple\", \"tomato\"],\n },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n node2: {\n agent: \"stringTemplateAgent\",\n params: {\n template: \"I love ${row}.\",\n },\n inputs: { row: \":row\" },\n isResult: true,\n },\n },\n },\n result: {\n node2: [\"I love apple.\", \"I love orange.\", \"I love banana.\", \"I love lemon.\", \"I love melon.\", \"I love pineapple.\", \"I love tomato.\"],\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n test: [[1], [2]],\n __mapIndex: [0, 1],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n {\n inputs: {\n rows: [1, 2],\n },\n params: {\n resultAll: true,\n compositeResult: true,\n },\n result: {\n __mapIndex: [0, 1],\n test: [[1], [2]],\n map: [\n {\n test: [[[1]], [[1]]],\n },\n {\n test: [[[2]], [[2]]],\n },\n ],\n row: [1, 2],\n },\n graph: {\n nodes: {\n test: {\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n map: {\n agent: \"mapAgent\",\n inputs: { rows: [\":test\", \":test\"] },\n params: {\n compositeResult: true,\n },\n graph: {\n nodes: {\n test: {\n isResult: true,\n agent: \"copyAgent\",\n params: { namedKey: \"rows\" },\n inputs: { rows: [\":row\"] },\n },\n },\n },\n },\n },\n },\n },\n ],\n description: \"Map Agent\",\n category: [\"graph\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default mapAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const totalAgent: AgentFunction, Record, { array: Record[] }> = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"totalAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"totalAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((result, input) => {\n const inputArray = Array.isArray(input) ? input : [input];\n inputArray.forEach((innerInput) => {\n Object.keys(innerInput).forEach((key) => {\n const value = innerInput[key];\n if (result[key]) {\n result[key] += value;\n } else {\n result[key] = value;\n }\n });\n });\n return result;\n }, {});\n};\n\n//\nconst totalAgentInfo: AgentFunctionInfo = {\n name: \"totalAgent\",\n agent: totalAgent,\n mock: totalAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: { array: [[{ a: 1, b: -1 }, { c: 10 }], [{ a: 2, b: -1 }], [{ a: 3, b: -2 }, { d: -10 }]] },\n params: {},\n result: { a: 6, b: -4, c: 10, d: -10 },\n },\n {\n inputs: { array: [{ a: 1 }] },\n params: {},\n result: { a: 1 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }] },\n params: {},\n result: { a: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2 }, { a: 3 }] },\n params: {},\n result: { a: 6 },\n },\n {\n inputs: {\n array: [\n { a: 1, b: 1 },\n { a: 2, b: 2 },\n { a: 3, b: 0 },\n ],\n },\n params: {},\n result: { a: 6, b: 3 },\n },\n {\n inputs: { array: [{ a: 1 }, { a: 2, b: 2 }, { a: 3, b: 0 }] },\n params: {},\n result: { a: 6, b: 2 },\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default totalAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const dataSumTemplateAgent: AgentFunction = async ({ namedInputs }) => {\n assert(isNamedInputs(namedInputs), \"dataSumTemplateAgent: namedInputs is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n assert(!!namedInputs?.array, \"dataSumTemplateAgent: namedInputs.array is UNDEFINED! Set inputs: { array: :arrayNodeId }\");\n\n return namedInputs.array.reduce((tmp, input) => {\n return tmp + input;\n }, 0);\n};\n\nconst dataSumTemplateAgentInfo: AgentFunctionInfo = {\n name: \"dataSumTemplateAgent\",\n agent: dataSumTemplateAgent,\n mock: dataSumTemplateAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of numbers to calculate the sum of\",\n items: {\n type: \"integer\",\n },\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"number\",\n },\n samples: [\n {\n inputs: { array: [1] },\n params: {},\n result: 1,\n },\n {\n inputs: { array: [1, 2] },\n params: {},\n result: 3,\n },\n {\n inputs: { array: [1, 2, 3] },\n params: {},\n result: 6,\n },\n ],\n description: \"Returns the sum of input values\",\n category: [\"data\"],\n author: \"Satoshi Nakajima\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default dataSumTemplateAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nconst applyFilter = (\n object: any,\n index: number,\n arrayInputs: any,\n include: Array | undefined,\n exclude: Array | undefined,\n alter: Record> | undefined,\n inject: Array> | undefined,\n swap: Record | undefined,\n inspect: Array> | undefined,\n) => {\n const propIds = include ? include : Object.keys(object);\n const excludeSet = new Set(exclude ?? []);\n const result = propIds.reduce((tmp: Record, propId) => {\n if (!excludeSet.has(propId)) {\n const mapping = alter && alter[propId];\n if (mapping && mapping[object[propId]]) {\n tmp[propId] = mapping[object[propId]];\n } else {\n tmp[propId] = object[propId];\n }\n }\n return tmp;\n }, {});\n\n if (inject) {\n inject.forEach((item) => {\n if (item.index === undefined || item.index === index) {\n result[item.propId] = arrayInputs[item.from];\n }\n });\n }\n if (inspect) {\n inspect.forEach((item) => {\n const value = arrayInputs[item.from ?? 1]; // default is arrayInputs[1]\n if (item.equal) {\n result[item.propId] = item.equal === value;\n } else if (item.notEqual) {\n result[item.propId] = item.notEqual !== value;\n }\n });\n }\n if (swap) {\n Object.keys(swap).forEach((key) => {\n const tmp = result[key];\n result[key] = result[swap[key]];\n result[swap[key]] = tmp;\n });\n }\n return result;\n};\n\nexport const propertyFilterAgent: AgentFunction<{\n include?: Array;\n exclude?: Array;\n alter?: Record>;\n inject?: Array>;\n inspect?: Array>;\n swap?: Record;\n}> = async ({ namedInputs, params }) => {\n const { include, exclude, alter, inject, swap, inspect } = params;\n const { array, item } = namedInputs;\n if (array) {\n // This is advanced usage, including \"inject\" and \"inspect\", which uses\n // array[1], array[2], ...\n const [target] = array; // Extract the first one\n if (Array.isArray(target)) {\n return target.map((item, index) => applyFilter(item, index, array, include, exclude, alter, inject, swap, inspect));\n }\n return applyFilter(target, 0, array, include, exclude, alter, inject, swap, inspect);\n } else if (item) {\n return applyFilter(item, 0, [], include, exclude, alter, inject, swap, inspect);\n }\n return false;\n};\n\nconst testInputs = {\n array: [\n [\n { color: \"red\", model: \"Model 3\", type: \"EV\", maker: \"Tesla\", range: 300 },\n { color: \"blue\", model: \"Model Y\", type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n \"Tesla Motors\",\n ],\n};\n\nconst propertyFilterAgentInfo: AgentFunctionInfo = {\n name: \"propertyFilterAgent\",\n agent: propertyFilterAgent,\n mock: propertyFilterAgent,\n inputs: {\n type: \"object\",\n },\n output: {\n type: \"any\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array to apply filter\",\n },\n item: {\n type: \"object\",\n description: \"the object to apply filter\",\n },\n },\n },\n samples: [\n {\n inputs: { array: [testInputs.array[0][0]] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { include: [\"color\", \"model\"] },\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: testInputs,\n params: { include: [\"color\", \"model\"] },\n result: [\n { color: \"red\", model: \"Model 3\" },\n { color: \"blue\", model: \"Model Y\" },\n ],\n },\n {\n inputs: testInputs,\n params: { exclude: [\"color\", \"model\"] },\n result: [\n { type: \"EV\", maker: \"Tesla\", range: 300 },\n { type: \"EV\", maker: \"Tesla\", range: 400 },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { exclude: [\"color\", \"model\"] },\n result: { type: \"EV\", maker: \"Tesla\", range: 300 },\n },\n {\n inputs: testInputs,\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: [\n {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n {\n color: \"red\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { alter: { color: { red: \"blue\", blue: \"red\" } } },\n result: {\n color: \"blue\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { swap: { maker: \"model\" } },\n result: [\n {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model Y\",\n range: 400,\n },\n ],\n },\n {\n inputs: { item: testInputs.array[0][0] },\n params: { swap: { maker: \"model\" } },\n result: {\n color: \"red\",\n model: \"Tesla\",\n type: \"EV\",\n maker: \"Model 3\",\n range: 300,\n },\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: { inject: [{ propId: \"maker\", from: 1, index: 0 }] },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla Motors\",\n range: 300,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n },\n ],\n },\n {\n inputs: testInputs,\n params: {\n inspect: [\n { propId: \"isTesla\", equal: \"Tesla Motors\" }, // from: 1 is implied\n { propId: \"isGM\", notEqual: \"Tesla Motors\", from: 1 },\n ],\n },\n result: [\n {\n color: \"red\",\n model: \"Model 3\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 300,\n isTesla: true,\n isGM: false,\n },\n {\n color: \"blue\",\n model: \"Model Y\",\n type: \"EV\",\n maker: \"Tesla\",\n range: 400,\n isTesla: true,\n isGM: false,\n },\n ],\n },\n ],\n description: \"Filter properties based on property name either with 'include', 'exclude', 'alter', 'swap', 'inject', 'inspect'\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default propertyFilterAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { isNamedInputs } from \"@graphai/agent_utils\";\n\nexport const copyAgent: AgentFunction<{\n namedKey?: string;\n}> = async ({ namedInputs, params }) => {\n const { namedKey } = params;\n assert(isNamedInputs(namedInputs), \"copyAgent: namedInputs is UNDEFINED!\");\n if (namedKey) {\n return namedInputs[namedKey];\n }\n return namedInputs;\n};\n\nconst copyAgentInfo: AgentFunctionInfo = {\n name: \"copyAgent\",\n agent: copyAgent,\n mock: copyAgent,\n inputs: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n output: {\n anyOf: [{ type: \"string\" }, { type: \"integer\" }, { type: \"object\" }, { type: \"array\" }],\n },\n samples: [\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: {},\n result: { color: \"red\", model: \"Model 3\" },\n },\n {\n inputs: { array: [\"Hello World\", \"Discarded\"] },\n params: {},\n result: { array: [\"Hello World\", \"Discarded\"] },\n },\n {\n inputs: { color: \"red\", model: \"Model 3\" },\n params: { namedKey: \"color\" },\n result: \"red\",\n },\n ],\n description: \"Returns namedInputs\",\n category: [\"data\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default copyAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\nexport const vanillaFetchAgent: AgentFunction<{ debug?: boolean; type?: string; throwError?: boolean }, any, any> = async ({ namedInputs, params }) => {\n const { url, method, queryParams, headers, body } = namedInputs;\n const throwError = params.throwError ?? false;\n\n const url0 = new URL(url);\n const headers0 = headers ? { ...headers } : {};\n\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n url0.search = params.toString();\n }\n\n if (body) {\n headers0[\"Content-Type\"] = \"application/json\";\n }\n\n const fetchOptions: RequestInit = {\n method: (method ?? body) ? \"POST\" : \"GET\",\n headers: new Headers(headers0),\n body: body ? JSON.stringify(body) : undefined,\n };\n\n if (params?.debug) {\n return {\n url: url0.toString(),\n method: fetchOptions.method,\n headers: headers0,\n body: fetchOptions.body,\n };\n }\n\n const response = await fetch(url0.toString(), fetchOptions);\n\n if (!response.ok) {\n const status = response.status;\n const type = params?.type ?? \"json\";\n const error = type === \"json\" ? await response.json() : await response.text();\n if (throwError) {\n throw new Error(`HTTP error: ${status}`);\n }\n return {\n onError: {\n message: `HTTP error: ${status}`,\n status,\n error,\n },\n };\n }\n\n const result = await (async () => {\n const type = params?.type ?? \"json\";\n if (type === \"json\") {\n return await response.json();\n } else if (type === \"text\") {\n return response.text();\n }\n throw new Error(`Unknown Type! ${type}`);\n })();\n\n return result;\n};\n\nconst vanillaFetchAgentInfo: AgentFunctionInfo = {\n name: \"vanillaFetchAgent\",\n agent: vanillaFetchAgent,\n mock: vanillaFetchAgent,\n inputs: {\n type: \"object\",\n properties: {\n url: {\n type: \"string\",\n description: \"baseurl\",\n },\n method: {\n type: \"string\",\n description: \"HTTP method\",\n },\n headers: {\n type: \"object\",\n description: \"HTTP headers\",\n },\n quaryParams: {\n type: \"object\",\n description: \"Query parameters\",\n },\n body: {\n anyOf: [{ type: \"string\" }, { type: \"object\" }],\n description: \"body\",\n },\n },\n required: [\"url\"],\n },\n output: {\n type: \"array\",\n },\n samples: [\n {\n inputs: { url: \"https://www.google.com\", queryParams: { foo: \"bar\" }, headers: { \"x-myHeader\": \"secret\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"GET\",\n url: \"https://www.google.com/?foo=bar\",\n headers: {\n \"x-myHeader\": \"secret\",\n },\n body: undefined,\n },\n },\n {\n inputs: { url: \"https://www.google.com\", body: { foo: \"bar\" } },\n params: {\n debug: true,\n },\n result: {\n method: \"POST\",\n url: \"https://www.google.com/\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ foo: \"bar\" }),\n },\n },\n ],\n description: \"Retrieves JSON data from the specified URL\",\n category: [\"service\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default vanillaFetchAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, sleep } from \"graphai\";\n\nexport const sleeperAgent: AgentFunction<{ duration?: number }> = async ({ params, namedInputs }) => {\n await sleep(params?.duration ?? 10);\n return namedInputs;\n};\n\nconst sleeperAgentInfo: AgentFunctionInfo = {\n name: \"sleeperAgent\",\n agent: sleeperAgent,\n mock: sleeperAgent,\n samples: [\n {\n inputs: {},\n params: { duration: 1 },\n result: {},\n },\n {\n inputs: { array: [{ a: 1 }, { b: 2 }] },\n params: { duration: 1 },\n result: {\n array: [{ a: 1 }, { b: 2 }],\n },\n },\n ],\n description: \"sleeper Agent\",\n category: [\"sleeper\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default sleeperAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\ntype CompareDataItem = string | number | boolean | CompareData;\ntype CompareData = CompareDataItem[];\n\nconst compare = (_array: CompareData): boolean => {\n if (_array.length !== 3) {\n throw new Error(`compare inputs length must must be 3`);\n }\n const array = _array.map((value) => {\n if (Array.isArray(value)) {\n return compare(value);\n }\n return value;\n });\n const [a, operator, b] = array;\n if (operator === \"==\") {\n return a === b;\n }\n if (operator === \"!=\") {\n return a !== b;\n }\n if (operator === \">\") {\n return Number(a) > Number(b);\n }\n if (operator === \">=\") {\n return Number(a) >= Number(b);\n }\n if (operator === \"<\") {\n return Number(a) < Number(b);\n }\n if (operator === \"<=\") {\n return Number(a) <= Number(b);\n }\n if (operator === \"||\") {\n return !!a || !!b;\n }\n if (operator === \"&&\") {\n return !!a && !!b;\n }\n if (operator === \"XOR\") {\n return !!a === !b;\n }\n throw new Error(`unknown compare operator`);\n};\n\nexport const compareAgent: AgentFunction = async ({ namedInputs, params }) => {\n const ret = compare(namedInputs.array);\n if (params?.value) {\n return params?.value[ret ? \"true\" : \"false\"] ?? ret;\n }\n return ret;\n};\n\nconst compareAgentInfo: AgentFunctionInfo = {\n name: \"compareAgent\",\n agent: compareAgent,\n mock: compareAgent,\n inputs: {},\n output: {},\n samples: [\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"a\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abca\"] },\n params: { value: { true: \"a\", false: \"b\" } },\n result: \"b\",\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abc\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"abc\", \"==\", \"abcd\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abc\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"abc\", \"!=\", \"abcd\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">\", \"15\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">\", 15] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \">=\", \"5\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \">=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 10\n inputs: { array: [\"10\", \">=\", \"19\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \">=\", 5] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \">=\", 19] },\n params: {},\n result: false,\n },\n //\n\n {\n inputs: { array: [\"10\", \"<\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<\", \"15\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<\", 15] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"5\"] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [\"10\", \"<=\", \"10\"] },\n params: {},\n result: true,\n },\n {\n // 20\n inputs: { array: [\"10\", \"<=\", \"19\"] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 5] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [10, \"<=\", 10] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [10, \"<=\", 19] },\n params: {},\n result: true,\n },\n\n {\n inputs: { array: [true, \"||\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"||\", false] },\n params: {},\n result: false,\n },\n\n {\n inputs: { array: [true, \"&&\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"&&\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [true, \"XOR\", false] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", true] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [false, \"XOR\", false] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [true, \"XOR\", true] },\n params: {},\n result: false,\n },\n //\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"||\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: true,\n },\n {\n inputs: { array: [[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"aaa\", \"==\", \"bbb\"]] },\n params: {},\n result: false,\n },\n {\n inputs: { array: [[[\"aaa\", \"==\", \"aaa\"], \"&&\", [\"bbb\", \"==\", \"bbb\"]], \"||\", [\"aaa\", \"&&\", \"bbb\"]] },\n params: {},\n result: true,\n },\n ],\n description: \"compare\",\n category: [\"compare\"],\n author: \"Receptron\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default compareAgentInfo;\n","import { AgentFunction, AgentFunctionInfo, assert } from \"graphai\";\nimport { arrayValidate } from \"@graphai/agent_utils\";\n\n// https://platform.openai.com/docs/guides/vision\nconst getImageUrl = (data: string, imageType: string, detail?: string) => {\n if (imageType === \"http\") {\n return {\n url: data,\n };\n }\n const dataUrl = `data:image/${imageType};base64,${data}`;\n return {\n url: dataUrl,\n detail: detail ?? \"auto\",\n };\n};\n\ntype Content = { type: string; image_url: { url: string; detail?: string } } | { type: string; text: string };\n\nexport const images2messageAgent: AgentFunction<\n {\n imageType: string;\n detail?: string;\n },\n {\n message: {\n role: \"user\";\n content: Content[];\n };\n },\n {\n array: string[];\n prompt?: string;\n }\n> = async ({ namedInputs, params }) => {\n const { imageType, detail } = params;\n const { array, prompt } = namedInputs;\n arrayValidate(\"images2messageAgent\", namedInputs);\n assert(!!imageType, \"images2messageAgent: params.imageType is UNDEFINED! Set Type: png, jpg...\");\n\n const contents: Content[] = array.map((base64ImageData) => {\n const image_url = getImageUrl(base64ImageData, imageType, detail);\n return {\n type: \"image_url\",\n image_url,\n };\n });\n\n if (prompt) {\n contents.unshift({ type: \"text\", text: prompt });\n }\n\n return {\n message: {\n role: \"user\",\n content: contents,\n },\n };\n};\n\nconst images2messageAgentInfo: AgentFunctionInfo = {\n name: \"images2messageAgent\",\n agent: images2messageAgent,\n mock: images2messageAgent,\n inputs: {\n type: \"object\",\n properties: {\n array: {\n type: \"array\",\n description: \"the array of base64 image data\",\n },\n prompt: {\n type: \"string\",\n description: \"prompt message\",\n },\n },\n required: [\"array\"],\n },\n output: {\n type: \"object\",\n },\n samples: [\n {\n inputs: { array: [\"abcabc\", \"122123\"] },\n params: { imageType: \"png\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"auto\",\n url: \"data:image/png;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"abcabc\", \"122123\"], prompt: \"hello\" },\n params: { imageType: \"jpg\", detail: \"high\" },\n result: {\n message: {\n content: [\n {\n type: \"text\",\n text: \"hello\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,abcabc\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n detail: \"high\",\n url: \"data:image/jpg;base64,122123\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n {\n inputs: { array: [\"http://example.com/1.jpg\", \"http://example.com/2.jpg\"] },\n params: { imageType: \"http\" },\n result: {\n message: {\n content: [\n {\n image_url: {\n url: \"http://example.com/1.jpg\",\n },\n type: \"image_url\",\n },\n {\n image_url: {\n url: \"http://example.com/2.jpg\",\n },\n type: \"image_url\",\n },\n ],\n role: \"user\",\n },\n },\n },\n ],\n description: \"Returns the message data for llm include image\",\n category: [\"image\"],\n author: \"Receptron team\",\n repository: \"https://github.com/snakajima/graphai\",\n license: \"MIT\",\n};\nexport default images2messageAgentInfo;\n","import { AgentFunction, AgentFunctionInfo } from \"graphai\";\n\n// Type for OpenAI's Embedding API\ninterface EmbeddingResponse {\n object: string;\n model: string;\n usage: {\n prompt_tokens: number;\n total_tokens: number;\n };\n data: [\n {\n object: string;\n index: number;\n embedding: number[];\n },\n ];\n}\n\nconst defaultEmbeddingModel = \"text-embedding-3-small\";\nconst OpenAI_embedding_API = \"https://api.openai.com/v1/embeddings\";\n\n// This agent retrieves embedding vectors for an array of strings using OpenAI's API\n//\n// Parameters:\n// model: Specifies the model (default is \"text-embedding-3-small\")\n// NamedInputs:\n// array: Array\n// item: string,\n// Result:\n// contents: Array>\n//\nexport const stringEmbeddingsAgent: AgentFunction<\n {\n model?: string;\n },\n number[][],\n { array: Array; item: string }\n> = async ({ params, namedInputs }) => {\n const { array, item } = namedInputs;\n\n const sources = array ?? [item];\n const apiKey = process.env.OPENAI_API_KEY;\n if (!apiKey) {\n throw new Error(\"OPENAI_API_KEY key is not set in environment variables.\");\n }\n const headers = {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${apiKey}`,\n };\n\n const response = await fetch(OpenAI_embedding_API, {\n method: \"POST\",\n headers: headers,\n body: JSON.stringify({\n input: sources,\n model: params?.model ?? defaultEmbeddingModel,\n }),\n });\n const jsonResponse: EmbeddingResponse = await response.json();\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const embeddings = jsonResponse.data.map((object) => {\n return object.embedding;\n });\n return embeddings;\n};\n\nconst stringEmbeddingsAgentInfo: AgentFunctionInfo = {\n name: \"stringEmbeddingsAgent\",\n agent: stringEmbeddingsAgent,\n mock: stringEmbeddingsAgent,\n samples: [],\n description: \"Embeddings Agent\",\n category: [\"embedding\"],\n author: \"Receptron team\",\n repository: \"https://github.com/receptron/graphai\",\n license: \"MIT\",\n};\nexport default stringEmbeddingsAgentInfo;\n"],"names":["assert","isObject","graphDataLatestVersion","GraphAI","arrayValidate","isNamedInputs","sleep"],"mappings":";;;;;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAM,gBAAgB,GAAG,IAAI;IAEtB,MAAM,mBAAmB,GAc5B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAI;IACpC,IAAAA,cAAM,CAAC,CAAC,CAAC,WAAW,EAAE,gDAAgD,CAAC;IACvE,IAAA,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI;IAC/B,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,gBAAgB;IACtD,IAAA,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC;IAC3D,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC;QACnE,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,KA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IACvB,IAAA,MAAM,EAAE,gBAAgB;IACxB,IAAA,UAAU,EAAE,sCAAsC;IAClD,IAAA,OAAO,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/agents/vanilla_agents/lib/graph_agents/nested_agent.d.ts b/agents/vanilla_agents/lib/graph_agents/nested_agent.d.ts index 5c1092f9..c5c3de84 100644 --- a/agents/vanilla_agents/lib/graph_agents/nested_agent.d.ts +++ b/agents/vanilla_agents/lib/graph_agents/nested_agent.d.ts @@ -1,5 +1,8 @@ import type { AgentFunction, AgentFunctionInfo, AgentFunctionContext, GraphData } from "graphai"; -export declare const nestedAgentGenerator: (graphData: GraphData) => (context: AgentFunctionContext) => Promise; +type NestedAgentGeneratorOption = { + resultNodeId: string; +}; +export declare const nestedAgentGenerator: (graphData: GraphData, options?: NestedAgentGeneratorOption) => (context: AgentFunctionContext) => Promise; export declare const nestedAgent: AgentFunction<{ throwError?: boolean; }>; diff --git a/agents/vanilla_agents/lib/graph_agents/nested_agent.js b/agents/vanilla_agents/lib/graph_agents/nested_agent.js index d3aeebb9..85bceac9 100644 --- a/agents/vanilla_agents/lib/graph_agents/nested_agent.js +++ b/agents/vanilla_agents/lib/graph_agents/nested_agent.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.nestedAgent = exports.nestedAgentGenerator = void 0; const graphai_1 = require("graphai"); -const nestedAgentGenerator = (graphData) => { +const nestedAgentGenerator = (graphData, options) => { return async (context) => { const { namedInputs, log, debugInfo, params, forNestedGraph } = context; (0, graphai_1.assert)(!!forNestedGraph, "Please update graphai to 0.5.19 or higher"); @@ -40,6 +40,9 @@ const nestedAgentGenerator = (graphData) => { } const results = await graphAI.run(false); log?.push(...graphAI.transactionLogs()); + if (options && options.resultNodeId) { + return results[options.resultNodeId]; + } return results; } catch (error) { diff --git a/agents/vanilla_agents/lib/string_agents/index.d.ts b/agents/vanilla_agents/lib/string_agents/index.d.ts index cd275af5..5cc80234 100644 --- a/agents/vanilla_agents/lib/string_agents/index.d.ts +++ b/agents/vanilla_agents/lib/string_agents/index.d.ts @@ -2,4 +2,5 @@ import stringSplitterAgent from "./string_splitter_agent"; import stringTemplateAgent from "./string_template_agent"; import jsonParserAgent from "./json_parser_agent"; import stringCaseVariantsAgent from "./string_case_variants_agent"; -export { stringSplitterAgent, stringTemplateAgent, jsonParserAgent, stringCaseVariantsAgent }; +import updateTextAgent from "./update_text_agent"; +export { stringSplitterAgent, stringTemplateAgent, jsonParserAgent, stringCaseVariantsAgent, updateTextAgent }; diff --git a/agents/vanilla_agents/lib/string_agents/index.js b/agents/vanilla_agents/lib/string_agents/index.js index f7cb22bc..5fa25b5f 100644 --- a/agents/vanilla_agents/lib/string_agents/index.js +++ b/agents/vanilla_agents/lib/string_agents/index.js @@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.stringCaseVariantsAgent = exports.jsonParserAgent = exports.stringTemplateAgent = exports.stringSplitterAgent = void 0; +exports.updateTextAgent = exports.stringCaseVariantsAgent = exports.jsonParserAgent = exports.stringTemplateAgent = exports.stringSplitterAgent = void 0; const string_splitter_agent_1 = __importDefault(require("./string_splitter_agent")); exports.stringSplitterAgent = string_splitter_agent_1.default; const string_template_agent_1 = __importDefault(require("./string_template_agent")); @@ -12,3 +12,5 @@ const json_parser_agent_1 = __importDefault(require("./json_parser_agent")); exports.jsonParserAgent = json_parser_agent_1.default; const string_case_variants_agent_1 = __importDefault(require("./string_case_variants_agent")); exports.stringCaseVariantsAgent = string_case_variants_agent_1.default; +const update_text_agent_1 = __importDefault(require("./update_text_agent")); +exports.updateTextAgent = update_text_agent_1.default; diff --git a/agents/vanilla_agents/package.json b/agents/vanilla_agents/package.json index a54da221..2d31b06c 100644 --- a/agents/vanilla_agents/package.json +++ b/agents/vanilla_agents/package.json @@ -1,6 +1,6 @@ { "name": "@graphai/vanilla", - "version": "0.2.7", + "version": "0.2.8", "description": "Vanilla agents for GraphAI.", "main": "lib/bundle.cjs.js", "module": "lib/bundle.esm.js", From afb167d5ffeff8631971332c04e5045f41f99c66 Mon Sep 17 00:00:00 2001 From: isamu Date: Fri, 17 Jan 2025 08:09:07 +0900 Subject: [PATCH 6/7] update document --- agents/vanilla_agents/README.md | 109 +++++++++++++++++--- agents/vanilla_agents/docs/GraphDataYAML.md | 4 +- 2 files changed, 93 insertions(+), 20 deletions(-) diff --git a/agents/vanilla_agents/README.md b/agents/vanilla_agents/README.md index 146b7311..ae866d95 100644 --- a/agents/vanilla_agents/README.md +++ b/agents/vanilla_agents/README.md @@ -37,10 +37,12 @@ import { sleeperAgent, sortByValuesAgent, streamMockAgent, + stringCaseVariantsAgent, stringEmbeddingsAgent, stringSplitterAgent, stringTemplateAgent, totalAgent, + updateTextAgent, vanillaFetchAgent } from "@graphai/vanilla"; @@ -67,10 +69,12 @@ const agents = { sleeperAgent, sortByValuesAgent, streamMockAgent, + stringCaseVariantsAgent, stringEmbeddingsAgent, stringSplitterAgent, stringTemplateAgent, totalAgent, + updateTextAgent, vanillaFetchAgent }; @@ -101,10 +105,12 @@ const result = await graph.run(); - sleeperAgent - sleeper Agent - sortByValuesAgent - sortByValues Agent - streamMockAgent - Stream mock agent +- stringCaseVariantsAgent - Format String Cases agent - stringEmbeddingsAgent - Embeddings Agent - stringSplitterAgent - This agent strip one long string into chunks using following parameters - stringTemplateAgent - Template agent - totalAgent - Returns the sum of input values +- updateTextAgent - - vanillaFetchAgent - Retrieves JSON data from the specified URL ### Input/Output/Params Schema & samples @@ -130,10 +136,12 @@ const result = await graph.run(); - [sleeperAgent](https://github.com/receptron/graphai/blob/main/docs/agentDocs/sleeper/sleeperAgent.md) - [sortByValuesAgent](https://github.com/receptron/graphai/blob/main/docs/agentDocs/matrix/sortByValuesAgent.md) - [streamMockAgent](https://github.com/receptron/graphai/blob/main/docs/agentDocs/test/streamMockAgent.md) + - [stringCaseVariantsAgent](https://github.com/receptron/graphai/blob/main/docs/agentDocs/string/stringCaseVariantsAgent.md) - [stringEmbeddingsAgent](https://github.com/receptron/graphai/blob/main/docs/agentDocs/embedding/stringEmbeddingsAgent.md) - [stringSplitterAgent](https://github.com/receptron/graphai/blob/main/docs/agentDocs/string/stringSplitterAgent.md) - [stringTemplateAgent](https://github.com/receptron/graphai/blob/main/docs/agentDocs/string/stringTemplateAgent.md) - [totalAgent](https://github.com/receptron/graphai/blob/main/docs/agentDocs/data/totalAgent.md) + - [updateTextAgent](https://github.com/receptron/graphai/blob/main/docs/agentDocs/undefined/updateTextAgent.md) - [vanillaFetchAgent](https://github.com/receptron/graphai/blob/main/docs/agentDocs/service/vanillaFetchAgent.md) ### Input/Params example @@ -422,6 +430,44 @@ const result = await graph.run(); - compareAgent +```typescript +{ + "inputs": { + "array": [ + "abc", + "==", + "abc" + ] + }, + "params": { + "value": { + "true": "a", + "false": "b" + } + } +} +``` + + +```typescript +{ + "inputs": { + "array": [ + "abc", + "==", + "abca" + ] + }, + "params": { + "value": { + "true": "a", + "false": "b" + } + } +} +``` + + ```typescript { "inputs": { @@ -1945,23 +1991,6 @@ const result = await graph.run(); ``` -```typescript -{ - "inputs": [ - { - "a": 1 - }, - { - "b": 2 - } - ], - "params": { - "duration": 1 - } -} -``` - - ```typescript { "inputs": { @@ -2044,6 +2073,29 @@ const result = await graph.run(); }, "params": {} } +``` + + - stringCaseVariantsAgent + +```typescript +{ + "inputs": { + "text": "this is a pen" + }, + "params": {} +} +``` + + +```typescript +{ + "inputs": { + "text": "string case variants" + }, + "params": { + "suffix": "agent" + } +} ``` - stringSplitterAgent @@ -2319,6 +2371,29 @@ const result = await graph.run(); }, "params": {} } +``` + + - updateTextAgent + +```typescript +{ + "inputs": { + "newText": "new", + "oldText": "old" + }, + "params": {} +} +``` + + +```typescript +{ + "inputs": { + "newText": "", + "oldText": "old" + }, + "params": {} +} ``` - vanillaFetchAgent diff --git a/agents/vanilla_agents/docs/GraphDataYAML.md b/agents/vanilla_agents/docs/GraphDataYAML.md index 3ee775ac..f8aebf52 100644 --- a/agents/vanilla_agents/docs/GraphDataYAML.md +++ b/agents/vanilla_agents/docs/GraphDataYAML.md @@ -51,11 +51,9 @@ nodes: version: 0.5 nodes: source: - value: > + value: | ```json - {"version":0.5,"loop":{"count":5},"nodes":{"array":{"value":[],"update":":reducer.array"},"item":{"agent":"sleepAndMergeAgent","params":{"duration":10,"value":"hello"}},"reducer":{"isResult":true,"agent":"pushAgent","inputs":{"array":":array","item":":item"}}}} - ``` parser: agent: jsonParserAgent From 5e3fe427db997ee0342c81758c165ef74ce3c771 Mon Sep 17 00:00:00 2001 From: isamu Date: Fri, 17 Jan 2025 08:23:46 +0900 Subject: [PATCH 7/7] fix type --- agents/vanilla_agents/src/string_agents/update_text_agent.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agents/vanilla_agents/src/string_agents/update_text_agent.ts b/agents/vanilla_agents/src/string_agents/update_text_agent.ts index 924d88bf..ae8b9d5d 100644 --- a/agents/vanilla_agents/src/string_agents/update_text_agent.ts +++ b/agents/vanilla_agents/src/string_agents/update_text_agent.ts @@ -1,5 +1,5 @@ import { nestedAgentGenerator } from "@/generator"; -import { graphDataLatestVersion } from "graphai"; +import { graphDataLatestVersion, AgentFunctionInfo } from "graphai"; const updateTextGraph = { version: graphDataLatestVersion, @@ -38,7 +38,7 @@ const updateTextGraph = { const updateTextAgent = nestedAgentGenerator(updateTextGraph, { resultNodeId: "resultText" }); -const updateTextAgentInfo = { +const updateTextAgentInfo: AgentFunctionInfo = { name: "updateTextAgent", agent: updateTextAgent, mock: updateTextAgent,