craft fix

This commit is contained in:
2026-01-31 18:49:08 -05:00
parent 80bbfbe58e
commit 9acd38c94b
9 changed files with 1535 additions and 102 deletions

View File

@@ -0,0 +1,25 @@
'use strict';
const GeminiProvider = require('./gemini');
const OllamaProvider = require('./ollama');
class ProviderFactory {
static create(config) {
const provider = config.provider || 'gemini';
switch (provider.toLowerCase()) {
case 'gemini':
return new GeminiProvider(config);
case 'ollama':
return new OllamaProvider(config);
default:
throw new Error(`Unknown AI provider: ${provider}. Supported: 'gemini', 'ollama'`);
}
}
}
module.exports = {
ProviderFactory,
GeminiProvider,
OllamaProvider
};