소스 검색

check the precense of the api key before trying to initialize cohere

jnfrati 4 년 전
부모
커밋
b66ec815a5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      dashboard/src/index.tsx

+ 1 - 1
dashboard/src/index.tsx

@@ -14,7 +14,7 @@ declare global {
   }
   }
 }
 }
 
 
-if (process.env.ENABLE_COHERE) {
+if (process.env.ENABLE_COHERE && process.env.COHERE_API_KEY) {
   Cohere.init(process.env.COHERE_API_KEY);
   Cohere.init(process.env.COHERE_API_KEY);
 }
 }