import { AIConfig, ChatMessage, ChatContext, StreamEvent, TestConnectionResult, AIModelConfig } from './types';
/**
 * 构建包含上下文的消息
 */
export declare function buildContextMessage(userMessage: string, context?: ChatContext): string;
/**
 * 构建系统提示词
 */
export declare function buildSystemPrompt(basePrompt: string, context?: ChatContext): string;
/**
 * 发送聊天消息（带重试机制）
 */
export declare function sendChatMessage(messages: ChatMessage[], onEvent: (event: StreamEvent) => void, config?: AIConfig, context?: ChatContext, signal?: AbortSignal, options?: {
    timeout?: number;
    retryCount?: number;
    retryDelay?: number;
}): Promise<void>;
/**
 * 测试连接
 */
export declare function testAIConnection(providerType: string, modelConfig: AIModelConfig, systemPrompt?: string): Promise<TestConnectionResult>;
/**
 * 生成消息ID
 */
export declare function generateMessageId(): string;
/**
 * 创建用户消息
 */
export declare function createUserMessage(content: string): ChatMessage;
/**
 * 创建助手消息
 */
export declare function createAssistantMessage(content?: string): ChatMessage;
/**
 * 更新助手消息内容
 */
export declare function updateAssistantMessage(message: ChatMessage, content: string, isStreaming?: boolean, error?: string): ChatMessage;
//# sourceMappingURL=chat.d.ts.map