import { Module, forwardRef } from '@nestjs/common';
import { ChatController } from './chat.controller';
import { ChatService } from './chat.service';
import { ElasticsearchModule } from '../elasticsearch/elasticsearch.module';
import { KnowledgeBaseModule } from '../knowledge-base/knowledge-base.module';
import { ModelConfigModule } from '../model-config/model-config.module';
import { UserSettingModule } from '../user-setting/user-setting.module';
import { KnowledgeGroupModule } from '../knowledge-group/knowledge-group.module';
import { SearchHistoryModule } from '../search-history/search-history.module';
import { RagModule } from '../rag/rag.module';
import { TenantModule } from '../tenant/tenant.module';

@Module({
  imports: [
    forwardRef(() => ElasticsearchModule),
    forwardRef(() => KnowledgeBaseModule),
    ModelConfigModule,
    UserSettingModule,
    forwardRef(() => KnowledgeGroupModule),
    SearchHistoryModule,
    RagModule,
    TenantModule,
  ],
  controllers: [ChatController],
  providers: [ChatService],
  exports: [ChatService],
})
export class ChatModule { }
