-
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from erictik:queue
fix queue
- Loading branch information
Showing
6 changed files
with
109 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require("dotenv").config(); | ||
const { Midjourney } = require("../libs"); | ||
/** | ||
* | ||
* a simple example of how to use the imagine command | ||
* ``` | ||
* npx tsx example/imagine.ts | ||
* ``` | ||
*/ | ||
async function main() { | ||
const client = new Midjourney( | ||
process.env.SERVER_ID, | ||
process.env.CHANNEL_ID, | ||
process.env.SALAI_TOKEN, | ||
true | ||
); | ||
const msg = await client.Imagine("A little pink elephant", (uri) => { | ||
console.log("loading", uri); | ||
}); | ||
console.log({ msg }); | ||
} | ||
main().catch((err) => { | ||
console.error(err); | ||
process.exit(1); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.