Browse Source

Merge pull request #3372 from H0llyW00dzZ/fixserverside

Yifei Zhang 1 year ago
parent
commit
03756e364a
1 changed files with 4 additions and 1 deletions
  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(
     () => {