import type { SearchOptions, SearchResult, ProviderConfig } from "../types.js"; /** * 搜索提供商基类 * * 所有提供商必须继承此类并实现 search 方法 */ export declare abstract class BaseProvider { /** 提供商名称 */ readonly name: string; /** 提供商配置 */ protected config: ProviderConfig; constructor(name: string, config: ProviderConfig); /** * 执行搜索 * * @param query 搜索查询 * @param options 搜索选项 * @returns 搜索结果 */ abstract search(query: string, options?: SearchOptions): Promise; /** * 构建搜索提示词 * * @param query 用户查询 * @param context 上下文信息 * @returns 完整的提示词 */ protected buildPrompt(query: string, context?: string): string; /** * 获取使用的模型名称 */ protected getModel(options?: SearchOptions): string; /** * 检查配置是否有效 */ abstract isConfigured(): boolean; /** * 获取配置错误信息 */ abstract getConfigError(): string | null; } //# sourceMappingURL=base.d.ts.map