/** * 搜索选项 */ export interface SearchOptions { /** 指定模型 */ model?: string; /** 最大 token 数 */ maxTokens?: number; /** 搜索上下文 */ context?: string; /** 超时时间 (毫秒) */ timeout?: number; } /** * 搜索来源 */ export interface Source { /** 来源标题 */ title: string; /** 来源 URL */ url: string; /** 摘要片段 */ snippet?: string; } /** * 搜索结果 */ export interface SearchResult { /** 搜索结果内容 */ content: string; /** 来源列表 */ sources?: Source[]; /** 使用的模型 */ model: string; /** 提供商名称 */ provider: string; /** token 使用统计 */ usage?: { promptTokens: number; completionTokens: number; }; } /** * 提供商配置 */ export interface ProviderConfig { /** API Key */ apiKey?: string; /** API 基础地址 */ baseUrl?: string; /** 默认模型 */ model: string; /** 其他配置 */ [key: string]: unknown; } /** * 应用配置 */ export interface AppConfig { /** 默认提供商 */ defaultProvider: string; /** 提供商配置 */ providers: Record; /** 全局设置 */ settings: { /** 默认最大 token 数 */ maxTokens: number; /** 超时时间 (毫秒) */ timeout: number; /** 重试次数 */ retry: number; }; } /** * 支持的提供商类型 */ export type ProviderType = "gemini" | "deepseek" | "custom"; //# sourceMappingURL=types.d.ts.map