test: add the first E2E test and configuration to CI (#316)

* add tests
This commit is contained in:
Takanori Matsumoto
2024-03-25 13:01:05 +09:00
committed by GitHub
parent bdc98c6fa8
commit 5cda8b1b03
17 changed files with 4380 additions and 29 deletions

View File

@@ -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;