feat: add AIML API provider support

Introduces AIMLAPI as a supported AI provider, including model list, config validation, and engine implementation. Updates README and engine selection logic to integrate AIMLAPI for chat completions.

Refactor AimlApiEngine response handling

Removed dependency on removeContentTags and simplified message content extraction. Minor header formatting fix for HTTP-Referer. This streamlines the response handling and reduces unnecessary processing.
This commit is contained in:
D1m7asis
2025-08-01 13:18:05 +02:00
parent 7945f44259
commit c5ce50aaa3
4 changed files with 165 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ import { TestAi, TestMockType } from '../engine/testAi';
import { GroqEngine } from '../engine/groq';
import { MLXEngine } from '../engine/mlx';
import { DeepseekEngine } from '../engine/deepseek';
import { AimlApiEngine } from '../engine/aimlapi';
export function getEngine(): AiEngine {
const config = getConfig();
@@ -55,6 +56,9 @@ export function getEngine(): AiEngine {
case OCO_AI_PROVIDER_ENUM.DEEPSEEK:
return new DeepseekEngine(DEFAULT_CONFIG);
case OCO_AI_PROVIDER_ENUM.AIMLAPI:
return new AimlApiEngine(DEFAULT_CONFIG);
default:
return new OpenAiEngine(DEFAULT_CONFIG);
}