This commit is contained in:
Yifei Zhang 2023-04-17 11:36:32 +08:00 committed by GitHub
parent 76ef5ef9a9
commit b79845fcaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -25,6 +25,5 @@ export async function requestOpenai(req: NextRequest) {
},
method: req.method,
body: req.body,
duplex: !!req.body ? "half" : "",
});
}

View File

@ -17,7 +17,7 @@ async function makeRequest(req: NextRequest) {
},
{
status: 500,
},
}
);
}
}
@ -29,3 +29,7 @@ export async function POST(req: NextRequest) {
export async function GET(req: NextRequest) {
return makeRequest(req);
}
export const config = {
runtime: "edge",
};