Shun Miyazawa 11 месяцев назад
Родитель
Сommit
2507481f84
1 измененных файлов с 0 добавлено и 4 удалено
  1. 0 4
      apps/app/src/features/openai/server/services/openai.ts

+ 0 - 4
apps/app/src/features/openai/server/services/openai.ts

@@ -983,10 +983,6 @@ class OpenaiService implements IOpenaiService {
 
 let instance: OpenaiService;
 export const initializeOpenaiService = (crowi: Crowi): void => {
-  if (crowi == null) {
-    throw new Error('Crowi instance is required to initialize OpenaiService');
-  }
-
   const aiEnabled = configManager.getConfig('app:aiEnabled');
   const openaiServiceType = configManager.getConfig('openai:serviceType');
   if (aiEnabled && openaiServiceType != null && OpenaiServiceTypes.includes(openaiServiceType)) {