1
0

feat: Introduce an OpenAI-compatible client to replace the Groq-specific client and enable multiple LLM providers.

This commit is contained in:
2026-02-28 16:09:41 +01:00
parent 3ceecbe5ee
commit 4e04cc6042
7 changed files with 104 additions and 57 deletions

View File

@@ -53,14 +53,24 @@ public static class DaemonService
var stateTracker = new StateTracker();
var notifications = new Notifications();
var groqClient = new GroqApiClient(config.GroqApiKey);
var speechClient = new OpenAiCompatibleClient(config.GroqApiKey);
ILlmClient llmClient;
if (config.LlmProvider == "together")
{
llmClient = new OpenAiCompatibleClient(config.TogetherApiKey, "https://api.together.xyz/v1/", config.ReasoningEffort);
}
else
{
llmClient = new OpenAiCompatibleClient(config.GroqApiKey, "https://api.groq.com/openai/v1/", config.ReasoningEffort);
}
IAudioRecorder recorder = config.AudioBackend == "ffmpeg"
? new FfmpegAudioRecorder(stateTracker, notifications)
: new AudioRecorder(stateTracker, notifications);
var orchestrator = new TranscriptionOrchestrator(
groqClient,
groqClient,
speechClient,
llmClient,
configManager,
recorder,
notifications,