feat(config): add support for groq AI provider, including config validation and engine implementation (#381)

This commit is contained in:
BILLY Maxime
2024-09-07 14:03:25 +02:00
committed by GitHub
parent a91aa3b4de
commit 2d7e3842d6
4 changed files with 40 additions and 8 deletions
+4
View File
@@ -7,6 +7,7 @@ import { GeminiEngine } from '../engine/gemini';
import { OllamaEngine } from '../engine/ollama';
import { OpenAiEngine } from '../engine/openAi';
import { TestAi, TestMockType } from '../engine/testAi';
import { GroqEngine } from '../engine/groq';
export function getEngine(): AiEngine {
const config = getConfig();
@@ -39,6 +40,9 @@ export function getEngine(): AiEngine {
case OCO_AI_PROVIDER_ENUM.FLOWISE:
return new FlowiseEngine(DEFAULT_CONFIG);
case OCO_AI_PROVIDER_ENUM.GROQ:
return new GroqEngine(DEFAULT_CONFIG);
default:
return new OpenAiEngine(DEFAULT_CONFIG);
}