Просмотр исходного кода

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

jnfrati 4 лет назад
Родитель
Сommit
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);
 }