@voyager-0x/agent-mcp
Version:
Voyager MCP Agent - A powerful Model Context Protocol agent
52 lines (51 loc) • 1.41 kB
TypeScript
/**
* AI大模型配置管理模块
* 提供统一的配置管理,供所有AI相关模块使用
*/
export interface AIModelConfig {
apiKey: string;
baseURL: string;
model: string;
debug?: boolean;
}
declare class AIConfigManager {
private config;
private listeners;
/**
* 设置AI配置
*/
setConfig(config: AIModelConfig): void;
/**
* 获取AI配置
*/
getConfig(): AIModelConfig;
/**
* 更新部分配置
*/
updateConfig(partialConfig: Partial<AIModelConfig>): void;
/**
* 检查配置是否已初始化
*/
isConfigured(): boolean;
/**
* 监听配置变化
*/
onConfigChange(listener: (config: AIModelConfig) => void): () => void;
offConfigChange(listener: (config: AIModelConfig) => void): void;
/**
* 通知所有监听器
*/
private notifyListeners;
isDebug(): boolean | undefined;
/**
* 重置配置
*/
reset(): void;
}
export declare const aiConfigManager: AIConfigManager;
export declare const setAIConfig: (config: AIModelConfig) => void;
export declare const getAIConfig: () => AIModelConfig;
export declare const updateAIConfig: (config: Partial<AIModelConfig>) => void;
export declare const isAIConfigured: () => boolean;
export declare const onAIConfigChange: (listener: (config: AIModelConfig) => void) => () => void;
export {};