Skip to content

Commit

Permalink
benchmark2
Browse files Browse the repository at this point in the history
  • Loading branch information
snakajima committed May 9, 2024
1 parent 0467070 commit 861e72d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions samples/sample_benchmark2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { graphDataTestRunner } from "~/utils/runner";
import { groqAgent, fetchAgent, mapAgent } from "@/experimental_agents";

const graph_data = {
version: 0.2,
version: 0.3,
nodes: {
GSM8: {
// This node specifies the URL and query paramters to fetch GSM8K dataset.
Expand All @@ -21,32 +21,32 @@ const graph_data = {
fetch: {
// This node fetches the dataset over HTTP.
agent: "fetchAgent",
inputs: ["GSM8.url", "GSM8.query"],
inputs: [":GSM8.url", ":GSM8.query"],
},
rows: {
// This node extract the "row" property from each item in the dataset.
agent: (items: Array<Record<string, any>>) => items.map((item) => item.row),
inputs: ["fetch.rows"],
inputs: [":fetch.rows"],
},
map: {
// This node executes the nested graph concurrently
agent: "mapAgent",
inputs: ["rows"],
inputs: [":rows"],
isResult: true,
graph: {
version: 0.2,
version: 0.3,
nodes: {
groq: {
// This node sends the question on the current item to Llama3 on groq and get the answer.
agent: "groqAgent",
params: {
model: "Llama3-8b-8192",
},
inputs: ["$0.question"],
inputs: [":$0.question"],
},
answer: {
agent: (item: string) => item,
inputs: ["groq.choices.$0.message.content"],
inputs: [":groq.choices.$0.message.content"],
isResult: true,
},
},
Expand Down

0 comments on commit 861e72d

Please sign in to comment.