@vladimirdukelic/revolutionary-ui-factory
Version:
Revolutionary UI Factory System v2 - Generate ANY UI component for ANY framework with 60-95% code reduction
89 lines (88 loc) • 2.25 kB
TypeScript
/**
* AI Configuration Manager for Revolutionary UI Factory
* Manages custom AI provider configurations
*/
export interface AIConfig {
provider: AIProvider;
apiKey?: string;
endpoint?: string;
model?: string;
temperature?: number;
maxTokens?: number;
systemPrompt?: string;
customHeaders?: Record<string, string>;
}
export type AIProvider = 'openai' | 'anthropic' | 'google' | 'mistral' | 'groq' | 'deepseek' | 'cohere' | 'custom' | 'local';
export interface AIProviderInfo {
name: string;
models: string[];
requiresApiKey: boolean;
supportsStreaming: boolean;
configFields: ConfigField[];
}
export interface ConfigField {
name: string;
type: 'text' | 'password' | 'number' | 'select' | 'textarea';
label: string;
required: boolean;
options?: string[];
default?: any;
placeholder?: string;
}
export declare class AIConfigManager {
private static CONFIG_DIR;
private static AI_CONFIG_FILE;
private static AI_CONFIG_PATH;
private static providers;
/**
* Initialize config directory
*/
static init(): Promise<void>;
/**
* Get current AI configuration
*/
static getConfig(): Promise<AIConfig | null>;
/**
* Save AI configuration
*/
static saveConfig(config: AIConfig): Promise<void>;
/**
* Test AI configuration
*/
static testConfig(config: AIConfig): Promise<boolean>;
/**
* Test OpenAI configuration
*/
private static testOpenAI;
/**
* Test Anthropic configuration
*/
private static testAnthropic;
/**
* Test Google configuration
*/
private static testGoogle;
/**
* Test local configuration
*/
private static testLocal;
/**
* Test custom configuration
*/
private static testCustom;
/**
* Get provider info
*/
static getProviderInfo(provider: AIProvider): AIProviderInfo | undefined;
/**
* Get all providers
*/
static getAllProviders(): Array<{
key: AIProvider;
info: AIProviderInfo;
}>;
/**
* Generate component with custom AI
*/
static generateWithCustomAI(prompt: string, config: AIConfig): Promise<string>;
}