import { IFullUser } from 'src/modules/users/users.interface';
import { ChatHistory } from '../chat-history.model';
import mongoose, { Model } from 'mongoose';
import { CreateConversationDto } from '../chat-history.validation';
import { ChatFilterService } from 'src/shared/chat-guards/chat-filter/chat-filter.service';
import { CompanyAnalyticsService } from 'src/modules/company-analytics/company-analytics.service';
import { ChatGptTextService } from 'src/shared/third-party/services/chat-gpt/services/chat-gpt-text.service';
import { UserAnalyticsService } from 'src/modules/user-analytics/user-analytics.service';
import { ChatGptService } from 'src/shared/third-party/services/chat-gpt/chat-gpt.service';
import { SubscriptionsService } from 'src/modules/subscriptions/subscriptions.service';
import { LanguageService } from 'src/shared/language/language.service';
import { IChatDataToReturn } from '../chat-history.interface';
import { ClaudeService } from 'src/shared/third-party/services/claude/claude.service';
import { GeminiService } from 'src/shared/third-party/services/gemini/gemini.service';
import { AiModelsService } from 'src/modules/app-config/ai-models/ai-models.service';
import { FileHandlerStreamService } from './file-handler-stream.service';
interface ITextResponse {
    success: boolean;
    message: string;
    metadata?: any;
}
export declare class TextGeneratorStreamService {
    private readonly chatGptService;
    private readonly chatHistoryModel;
    private readonly connection;
    private readonly chatFilterService;
    private readonly companyAnalyticsService;
    private readonly userAnalyticsService;
    private readonly chatGptTextService;
    private readonly claudeService;
    private readonly subscriptionService;
    private readonly languageService;
    private readonly geminiService;
    private readonly aiModelsService;
    private readonly fileHandlerStreamService;
    private readonly logger;
    constructor(chatGptService: ChatGptService, chatHistoryModel: Model<ChatHistory>, connection: mongoose.Connection, chatFilterService: ChatFilterService, companyAnalyticsService: CompanyAnalyticsService, userAnalyticsService: UserAnalyticsService, chatGptTextService: ChatGptTextService, claudeService: ClaudeService, subscriptionService: SubscriptionsService, languageService: LanguageService, geminiService: GeminiService, aiModelsService: AiModelsService, fileHandlerStreamService: FileHandlerStreamService);
    handleTextMessage(createChatDto: CreateConversationDto, user: IFullUser, response: ITextResponse, blockedReason: string[], regenarateMessageId: string, isRegenerate: boolean, isRetry: boolean): Promise<IChatDataToReturn>;
    private buildBaseUserMessage;
    private needsDocumentExtraction;
    private extractAndUpdateDocumentMetadata;
    saveInitialConversation(createChatDto: CreateConversationDto, user: IFullUser, blockedReason: string[], isRegenerate: boolean, regenerateMessageId: string, isRetry: boolean): Promise<{
        conversationId: string;
        aiMessageId: string;
        chatHistory: any;
        isNewConversation: boolean;
    }>;
    completeAiMessage(conversationId: string, aiMessageId: string, response: ITextResponse, blockedReason: string[], user: IFullUser, isNewConversation: boolean, isRegenerate: boolean, regenerateMessageId: string): Promise<IChatDataToReturn>;
    setAiMessageErrorStatus(conversationId: string, aiMessageId: string, errorContent: string): Promise<void>;
    generateNewChatHistory(title: string, userId: string, type?: string): Promise<mongoose.Document<unknown, {}, ChatHistory, {}, {}> & ChatHistory & {
        _id: mongoose.Types.ObjectId;
    } & {
        __v: number;
    }>;
}
export {};
