UNPKG

@yk1028-test/ai-chat-supporter

Version:

AI Chat Supporter - TypeScript library for intelligent chat processing with LangChain integration

36 lines 1.35 kB
export interface LLMProviderConfig { model?: string; temperature?: number; maxTokens?: number; baseUrl?: string; apiKey?: string; [key: string]: any; } export interface ILLMProvider { name: string; configure(config?: LLMProviderConfig): Promise<void>; generateResponse(prompt: string): Promise<string>; isHealthy(): Promise<boolean>; } export declare abstract class BaseLLMProvider implements ILLMProvider { protected config: LLMProviderConfig; protected isConfigured: boolean; abstract name: string; constructor(config?: LLMProviderConfig); configure(config?: LLMProviderConfig): Promise<void>; protected abstract initializeProvider(): Promise<void>; abstract generateResponse(prompt: string): Promise<string>; abstract isHealthy(): Promise<boolean>; getConfig(): LLMProviderConfig; isReady(): boolean; } export declare class ProviderFactory { private static providers; static register(name: string, providerClass: new (config?: LLMProviderConfig) => ILLMProvider): void; static createProvider(name: string, config: LLMProviderConfig): ILLMProvider; static getRegisteredProviders(): string[]; static unregister(name: string): boolean; static clear(): void; static create(name: string): ILLMProvider | null; } //# sourceMappingURL=base.d.ts.map