Skip to content

Commit

Permalink
Update test script
Browse files Browse the repository at this point in the history
  • Loading branch information
liamgriffiths committed Apr 12, 2024
1 parent c03fae1 commit ff5ca9b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1,082 deletions.
16 changes: 11 additions & 5 deletions examples/kitchen-sink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const examples = [
prompt: "what are these paintings of and who made them?",
image_uris: [
"https://media.substrate.run/docs-fuji-red.jpg",
"https://media.substrate.run/docs-fuji-blue.png",
"https://media.substrate.run/docs-fuji-blue.jpg",
],
}),
envs: ALL_ENVS,
Expand Down Expand Up @@ -168,7 +168,7 @@ const examples = [
"hokusai futuristic supercell spiral cloud with glowing core over turbulent ocean",
store: "hosted",
}),
envs: [STAGING_V0, STAGING_V1],
envs: [STAGING_V0, PRODUCTION_V0],
},
{
node: new MultiGenerateImage({
Expand All @@ -177,7 +177,7 @@ const examples = [
store: "hosted",
num_images: 2,
}),
envs: [STAGING_V0, STAGING_V1],
envs: [STAGING_V0, PRODUCTION_V0],
},
{
node: new GenerativeEditImage({
Expand Down Expand Up @@ -480,10 +480,15 @@ const examples = [
},
];

const noColor = process.argv.includes("--no-color");
const ok = (message: string, ...rest: any[]) =>
console.log(`\x1b[32m✓ ${message}\x1b[0m`, ...rest);
noColor
? console.log(`✓ ${message}`, ...rest)
: console.log(`\x1b[32m✓ ${message}\x1b[0m`, ...rest);
const error = (message: string, ...rest: any[]) =>
console.log(`\x1b[31mx ${message}\x1b[0m`, ...rest);
noColor
? console.error(`x ${message}`, ...rest)
: console.error(`\x1b[31mx ${message}\x1b[0m`, ...rest);

async function main() {
const SUBSTRATE_API_KEY = process.env["SUBSTRATE_API_KEY"];
Expand Down Expand Up @@ -513,5 +518,6 @@ async function main() {
}
}
}
console.info("🌀 done.");
}
main();
Loading

0 comments on commit ff5ca9b

Please sign in to comment.