import { BaseAIProvider } from './base';
import { ChatMessage, StreamEvent, TestConnectionResult } from '../types';
interface OpenAIMessage {
    role: 'system' | 'user' | 'assistant';
    content: string;
}
interface OpenAIRequest {
    model: string;
    messages: OpenAIMessage[];
    max_tokens?: number;
    temperature?: number;
    stream: boolean;
}
export declare class OpenAIProvider extends BaseAIProvider {
    /**
     * 发送聊天消息（流式输出）
     */
    chat(messages: ChatMessage[], onEvent: (event: StreamEvent) => void, signal?: AbortSignal): Promise<void>;
    /**
     * 测试连接
     */
    testConnection(): Promise<TestConnectionResult>;
    /**
     * 构建请求头
     */
    protected buildHeaders(): Record<string, string>;
    /**
     * 构建请求体
     */
    protected buildRequestBody(messages: ChatMessage[]): OpenAIRequest;
    /**
     * 解析流式响应
     */
    protected parseStreamChunk(chunk: string, onEvent: (event: StreamEvent) => void): void;
}
export {};
//# sourceMappingURL=openai.d.ts.map