瀏覽代碼

Merge pull request #3372 from H0llyW00dzZ/fixserverside

Yifei Zhang 1 年之前
父節點
當前提交
03756e364a
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      app/api/common.ts

+ 4 - 1
app/api/common.ts

@@ -30,7 +30,10 @@ export async function requestOpenai(req: NextRequest) {
 
   console.log("[Proxy] ", path);
   console.log("[Base Url]", baseUrl);
-  console.log("[Org ID]", serverConfig.openaiOrgId);
+  // this fix [Org ID] undefined in server side if not using custom point
+  if (serverConfig.openaiOrgId !== undefined) {
+    console.log("[Org ID]", serverConfig.openaiOrgId);
+  }
 
   const timeoutId = setTimeout(
     () => {