From b79845fcaa5fce0da272b88564bf02d8252570c0 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Mon, 17 Apr 2023 11:36:32 +0800 Subject: [PATCH] fixup --- app/api/common.ts | 1 - app/api/openai/route.ts | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/api/common.ts b/app/api/common.ts index 65870ee91..53ab18ed6 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -25,6 +25,5 @@ export async function requestOpenai(req: NextRequest) { }, method: req.method, body: req.body, - duplex: !!req.body ? "half" : "", }); } diff --git a/app/api/openai/route.ts b/app/api/openai/route.ts index 261c20a85..0ac94bdd5 100644 --- a/app/api/openai/route.ts +++ b/app/api/openai/route.ts @@ -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", +};