import { Message, ModelConfig, ChatOptions } from '../types'; /** * 基础LLM客户端抽象类 * 定义了统一的接口和基础方法,具体提供商需要继承此类并实现相关方法 */ export declare abstract class BaseClient { /** API 端点 */ protected endpoint: string; /** API 密钥 */ protected apiKey: string; /** 模型名称 */ protected model: string; /** 模型配置参数 */ protected modelConfig: ModelConfig; /** * 创建基础客户端实例 * @param config 配置信息 */ constructor(config: Record); /** * 获取模型信息的抽象方法,子类必须实现 */ protected abstract _getModel(): any; /** * chat(普通输出) * @param messages 消息列表 * @param options 聊天选项 * @returns 模型响应 */ chat(messages: Message[], options?: ChatOptions): Promise; /** * chat(流式输出) * @param messages 消息列表 * @param options 聊天选项 * @returns 流式响应 */ chatStream(messages: Message[], options?: ChatOptions): Promise; /** * chat(纯API流式输出) * @param messages 消息列表 * @param options 聊天选项 * @returns 流式响应 */ chatStreamAPI(messages: Message[], options?: ChatOptions): Promise; /** * 消息格式转换 * @param data 原始消息数据 * @returns 转换后的消息格式 */ protected _convertJson(data: Message[]): any[]; }