import { PrismaService } from "../../../core/database/prisma/prisma.service";
import { Observable } from 'rxjs';
import { LLMService } from '../llm/llm.service';
import { PromptService } from '../prompt/prompt.service';
import { CreateConversationDto, SendMessageDto, QueryConversationDto } from '../dto';
export declare class ChatService {
    private readonly prisma;
    private readonly llmService;
    private readonly promptService;
    private readonly logger;
    private readonly CONTEXT_WINDOW_SIZE;
    constructor(prisma: PrismaService, llmService: LLMService, promptService: PromptService);
    createConversation(dto: CreateConversationDto, userId: string): Promise<{
        id: any;
        userId: any;
        title: any;
        category: any;
        status: any;
        tags: any;
        createdAt: any;
        updatedAt: any;
    }>;
    findConversations(query: QueryConversationDto, userId: string): Promise<{
        items: {
            id: string;
            title: string | null;
            category: import("@prisma/client").$Enums.AIConversationCategory;
            status: import("@prisma/client").$Enums.AIConversationStatus;
            tags: string[];
            lastMessage: string | null;
            messageCount: number;
            createdAt: Date;
            updatedAt: Date;
        }[];
        total: number;
        page: number;
        limit: number;
        totalPages: number;
        hasNext: boolean;
        hasPrev: boolean;
    }>;
    findConversation(id: string, userId: string): Promise<{
        id: any;
        userId: any;
        title: any;
        category: any;
        status: any;
        tags: any;
        messages: any;
        createdAt: any;
        updatedAt: any;
    }>;
    deleteConversation(id: string, userId: string): Promise<{
        success: boolean;
    }>;
    sendMessage(conversationId: string, dto: SendMessageDto, userId: string): Promise<{
        userMessage: {
            id: string;
            role: import("@prisma/client").$Enums.AIMessageRole;
            source: import("@prisma/client").$Enums.AIMessageSource;
            content: string;
            createdAt: Date;
        };
        streamUrl: string;
        aiMessageId: string;
    }>;
    streamReply(conversationId: string, messageId: string, userId: string): Promise<Observable<MessageEvent>>;
    private executeStreamReply;
    private buildContext;
    private getDefaultSystemPrompt;
    private formatConversation;
    private formatConversationDetail;
}
interface MessageEvent {
    data: string;
}
export {};
