Parcourir la source

fix: #2061 RequestInit TypeError

mushan0x0 il y a 1 an
Parent
commit
9c05d136f5
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      app/api/common.ts

+ 2 - 0
app/api/common.ts

@@ -43,6 +43,8 @@ export async function requestOpenai(req: NextRequest) {
     cache: "no-store",
     method: req.method,
     body: req.body,
+    // @ts-ignore
+    duplex: "half",
     signal: controller.signal,
   };