feat: Introduce an OpenAI-compatible client to replace the Groq-specific client and enable multiple LLM providers.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user