Skip to content

Commit

Permalink
Addresses comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kgrofelnik committed Apr 10, 2024
1 parent 791091a commit 286d574
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions contracts/tasks/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,35 @@ task("e2e", "Runs all e2e tests")
"Who is the president of USA?",
hre,
)
testResults["OpenAI gpt-4-turbo-preview"] = result.error.length ? result.error : "✅";
testResults["OpenAI gpt-4-turbo-preview"] = result.error || "✅";
result = await runOpenAi(
contractAddress,
"gpt-3.5-turbo-1106",
"Who is the president of USA?",
hre,
)
testResults["OpenAI gpt-3.5-turbo-1106"] = result.error.length ? result.error : "✅";
testResults["OpenAI gpt-3.5-turbo-1106"] = result.error || "✅";
result = await runGroq(
contractAddress,
"llama2-70b-4096",
"Who is the president of USA?",
hre,
)
testResults["Groq llama2-70b-4096"] = result.error.length ? result.error : "✅";
testResults["Groq llama2-70b-4096"] = result.error || "✅";
result = await runGroq(
contractAddress,
"mixtral-8x7b-32768",
"Who is the president of USA?",
hre,
)
testResults["Groq mixtral-8x7b-32768"] = result.error.length ? result.error : "✅";
testResults["Groq mixtral-8x7b-32768"] = result.error || "✅";
result = await runGroq(
contractAddress,
"gemma-7b-it",
"Who is the president of USA?",
hre,
)
testResults["gemma-7b-it mixtral-8x7b-32768"] = result.error.length ? result.error : "✅";
testResults["gemma-7b-it mixtral-8x7b-32768"] = result.error || "✅";
result = await runTaskWithTimeout(
"image_generation",
{
Expand All @@ -66,7 +66,7 @@ task("e2e", "Runs all e2e tests")
},
hre,
)
testResults["OpenAI image_generation"] = result.error.length ? result.error : "✅";
testResults["OpenAI image_generation"] = result.error || "✅";
result = await runTaskWithTimeout(
"web_search",
{
Expand All @@ -75,7 +75,7 @@ task("e2e", "Runs all e2e tests")
},
hre,
)
testResults["web_search"] = result.error.length ? result.error : "✅";
testResults["web_search"] = result.error || "✅";
result = await runTaskWithTimeout(
"code_interpreter",
{
Expand All @@ -84,7 +84,7 @@ task("e2e", "Runs all e2e tests")
},
hre,
)
testResults["code_interpreter"] = result.error.length ? result.error : "✅";
testResults["code_interpreter"] = result.error || "✅";

// console.log(`Running "add_knowledge_base"`)
// await runTaskWithTimeout(
Expand All @@ -105,7 +105,7 @@ task("e2e", "Runs all e2e tests")
},
hre,
)
testResults["query_knowledge_base"] = result.error.length ? result.error : "✅";
testResults["query_knowledge_base"] = result.error || "✅";
const totalTests = Object.keys(testResults).length;
const passedTests = Object.values(testResults).filter(result => result === "✅").length;
const failedTests = totalTests - passedTests;
Expand Down
2 changes: 1 addition & 1 deletion contracts/tasks/e2eCron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ async function main(): Promise<void> {
"--network", network
];

let previousResult = false;
while (true) {
let previousResult = false;
console.log(`Running e2e tests with `)
previousResult = await runTests(command, args, slackWebHookUrl, previousResult)
console.log(`Run done, sleeping for ${TIMEOUT_SECONDS} seconds`)
Expand Down

0 comments on commit 286d574

Please sign in to comment.