mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-01-30 07:58:25 -05:00
test: ✅ add the first E2E test and configuration to CI (#316)
* add tests
This commit is contained in:
committed by
GitHub
parent
bdc98c6fa8
commit
5cda8b1b03
@@ -2,11 +2,14 @@ import { AiEngine } from '../engine/Engine';
|
||||
import { api } from '../engine/openAi';
|
||||
import { getConfig } from '../commands/config';
|
||||
import { ollamaAi } from '../engine/ollama';
|
||||
import { testAi } from '../engine/testAi';
|
||||
|
||||
export function getEngine(): AiEngine {
|
||||
const config = getConfig();
|
||||
if (config?.OCO_AI_PROVIDER == 'ollama') {
|
||||
return ollamaAi;
|
||||
} else if (config?.OCO_AI_PROVIDER == 'test') {
|
||||
return testAi;
|
||||
}
|
||||
//open ai gpt by default
|
||||
return api;
|
||||
|
||||
Reference in New Issue
Block a user