contaigents
Version:
Modular AI Content Ecosystem with Audio Generation
32 lines (31 loc) • 1.18 kB
JavaScript
/**
* Debug Provider Configuration
*
* This script helps debug the provider configuration issue
*/
import { LLMFactory } from '../services/llm/LLMFactory.js';
async function debugProviderConfig() {
console.log('🔍 Debugging Provider Configuration');
console.log('='.repeat(40));
try {
console.log('1. Getting Google provider...');
const googleProvider = LLMFactory.getProvider('google');
console.log('✅ Google provider obtained');
console.log('2. Checking if configured...');
const isConfigured = await googleProvider.isConfigured();
console.log(` Is configured: ${isConfigured}`);
console.log('3. Getting config...');
const config = googleProvider.getConfig();
console.log(` Config keys: ${Object.keys(config).join(', ')}`);
console.log(` API key present: ${!!config.apiKey}`);
console.log(` API key value: ${config.apiKey ? '[REDACTED]' : 'undefined'}`);
}
catch (error) {
console.error('❌ Error:', error);
}
}
// Run if called directly
if (import.meta.url === `file://${process.argv[1]}`) {
debugProviderConfig();
}