Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric committed Jun 4, 2023
1 parent 042e5f1 commit 8fa2eeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@vercel/analytics": "^1.0.1",
"axios": "^1.3.6",
"eventsource-parser": "^1.0.0",
"midjourney": "^2.4.45",
"midjourney": "^2.4.46",
"next": "^13.4.4"
},
"keywords": [
Expand Down
5 changes: 1 addition & 4 deletions pages/api/imagine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ import { ResponseError } from "../../interfaces";
export const config = {
runtime: "edge",
};
import WebSocket from "isomorphic-ws";

const handler = async (req: Request) => {
const { prompt } = await req.json();
if (typeof global !== "undefined") {
(global as any).WebSocket = WebSocket;
}

console.log("imagine.handler", prompt);
const client = new Midjourney({
ServerId: <string>process.env.SERVER_ID,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2231,10 +2231,10 @@ micromatch@^4.0.4, micromatch@^4.0.5:
braces "^3.0.2"
picomatch "^2.3.1"

midjourney@^2.4.45:
version "2.4.45"
resolved "https://registry.yarnpkg.com/midjourney/-/midjourney-2.4.45.tgz#1d7b1d38165606b07854f8693dd94da79ad87db6"
integrity sha512-6Iij4FC7g6nrRJ9Lftsp0mhl83puvsog4LhVb1vti+97tvYmnrNoRLgXK7v7uzLS3dX7q2QK6SUXpdU/PU4k1Q==
midjourney@^2.4.46:
version "2.4.46"
resolved "https://registry.yarnpkg.com/midjourney/-/midjourney-2.4.46.tgz#86da33cb630c94e034d2fc022072007709748793"
integrity sha512-ZSdk6Trb86gyQclZ6y20a66dXkmYQ3OYdSMguVbj5rv4gVV1NuOlqMvsbwL7SNdUC9KPaJfFtP6/mQZnpynKpw==
dependencies:
"@huggingface/inference" "^2.5.0"
isomorphic-ws "^5.0.0"
Expand Down

1 comment on commit 8fa2eeb

@vercel
Copy link

@vercel vercel bot commented on 8fa2eeb Jun 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.