diff --git a/src/modules/rag-chat/rag-chat.service.ts b/src/modules/rag-chat/rag-chat.service.ts index 43bf2f8..742f83d 100644 --- a/src/modules/rag-chat/rag-chat.service.ts +++ b/src/modules/rag-chat/rag-chat.service.ts @@ -1,4 +1,4 @@ -import { Injectable, NotFoundException, Logger } from '@nestjs/common'; +import { Injectable, NotFoundException, Logger, Optional } from '@nestjs/common'; import { PrismaService } from '../../infrastructure/database/prisma.service'; import { ContentSafetyService } from '../content-safety/content-safety.service'; @@ -8,7 +8,7 @@ export class RagChatService { constructor( private readonly prisma: PrismaService, - private readonly safety?: ContentSafetyService, + @Optional() private readonly safety?: ContentSafetyService, ) {} async createSession(userId: string, knowledgeBaseId: string, title?: string) {